Android 边缘衰减的背景图像
我试着在我的android项目中将背景图像设置为线性布局。除了屏幕左侧和右侧的淡入淡出的边缘外,一切都很好。我的背景图像尺寸是52x602,最初没有这样的褪色边缘。我希望背景图像覆盖所有区域。它也是由设计师完成的,我认为它使用了9-patch(图像周围的黑色边框)。如果没有这些边缘,如何正确设置背景 在emulator中,它如下所示: XML:Android 边缘衰减的背景图像,android,user-interface,Android,User Interface,我试着在我的android项目中将背景图像设置为线性布局。除了屏幕左侧和右侧的淡入淡出的边缘外,一切都很好。我的背景图像尺寸是52x602,最初没有这样的褪色边缘。我希望背景图像覆盖所有区域。它也是由设计师完成的,我认为它使用了9-patch(图像周围的黑色边框)。如果没有这些边缘,如何正确设置背景 在emulator中,它如下所示: XML: 尝试将fadingEdge设置为无 <LinearLayout xmlns:android="http://schemas.android.
尝试将fadingEdge设置为无
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/login_background"
android:orientation="vertical"
android:fadingEdge="none"
>
</LinearLayout>
尝试将fadingEdge设置为无
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/login_background"
android:orientation="vertical"
android:fadingEdge="none"
>
</LinearLayout>
好的,我自己找到答案了。如果是9-patch文件,.png文件必须以.9.png结尾…因此,如果有人遇到同样的问题,那么您就会知道。好的,我自己来回答。如果是9-patch文件,.png文件必须以.9.png结尾…因此,如果有人有相同的问题,那么您就会知道。您的问题不是很清楚。。。是否要删除左侧和右侧的淡入淡出?这不只是一个简单的photoshop/绘画工作吗?在我的背景图像中没有黑色褪色的边缘,所以我没有要删除的。你的问题不是很清楚。。。是否要删除左侧和右侧的淡入淡出?这不只是一个简单的photoshop/绘画工作吗?在我的背景图像中没有黑色的褪色边缘,所以我没有要删除的。