Android 如何为ScrollView设置固定图像背景?
我应该想要scrollview滚动条,而不是背景中的图像。将图像添加到scrollview框架之前视图层次结构的更高位置。示例如下:Android 如何为ScrollView设置固定图像背景?,android,layout,Android,Layout,我应该想要scrollview滚动条,而不是背景中的图像。将图像添加到scrollview框架之前视图层次结构的更高位置。示例如下: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/background_image"
android:orientation="vertical">
<ListView
android:id="@+id/category_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:cacheColorHint="@android:color/transparent"/>
<TextView
android:id="@android:id/empty"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
</LinearLayout>
在这里,线性布局保留了背景图像。该列表将以透明背景显示在其上方。有关此主题的更多信息,请查看对不起:您的答案也可以帮助我,但我只有一个“接受答案”。普兰蒂:谢谢你:-)