Android 奇怪的ListView滚动问题
我的应用程序中有一个具有背景图像的列表视图。所有行都是半透明白色(#35FFFFFF)。每当我滚动列表时,这些行都会变成浅绿色,遮住背景图像,直到我停止滚动为止(通常——有点不可预测)。有时它在背景图像/颜色和绿色之间闪烁。是的,我已将缓存颜色提示设置为#00000000。如果您对此有任何建议,我们将不胜感激 ListView xml:Android 奇怪的ListView滚动问题,android,image,listview,background,scroll,Android,Image,Listview,Background,Scroll,我的应用程序中有一个具有背景图像的列表视图。所有行都是半透明白色(#35FFFFFF)。每当我滚动列表时,这些行都会变成浅绿色,遮住背景图像,直到我停止滚动为止(通常——有点不可预测)。有时它在背景图像/颜色和绿色之间闪烁。是的,我已将缓存颜色提示设置为#00000000。如果您对此有任何建议,我们将不胜感激 ListView xml: <ListView xmlns:android="http://schemas.android.com/apk/res/android" andr
<ListView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="7px"
android:cacheColorHint="#00000000"
android:dividerHeight="6px"
android:"#75ffffff"
android:background="@drawable/list_bg"
android:fastScrollEnabled="true"
/>
行xml:
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/text"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textSize="18px"
android:textColor="@android:color/black"
android:gravity="center_vertical"
android:background="#35ffffff"
/>
位图xml:
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
android:src="@drawable/list_bg_bitmap"
android:tileMode="repeat"
android:dither="true"
/>
试试这个:
<ListView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="7px"
android:cacheColorHint="#00000000"
android:dividerHeight="6px"
android:"#75ffffff"
android:background="@drawable/list_bg"
android:fastScrollEnabled="true"
android:drawSelectorOnTop="false"
/>
我对list_bg.xml的内容很好奇。list_bg.xml是位图xml。很抱歉,我忘了提到这一点。我认为这与我的问题([Stackoverflow thread][1])有关,可能是Android中的一个bug。你找到解决办法了吗?[1] :“Stackoverflow线程”不,我没有,因为我不再从事这个项目了。但是谢谢你的输入。在以下方面帮了我很多:android:cacheColorHint=“#00000000”谢谢!