开发者

Strange ListView scrolling issues

开发者 https://www.devze.com 2023-01-11 13:19 出处:网络
I have a ListView in my app that has a background image. All of the rows are a semi transparent white (#35FFFFFF). Whenever I scroll the list, the rows turn a light green that obscures the background

I have a ListView in my app that has a background image. All of the rows are a semi transparent white (#35FFFFFF). Whenever I scroll the list, the rows turn a light green that obscures the background image until I stop scrolling (usually--sort of unpredictable). Sometimes it flickers between the background image/color and the green. And yes, I have set the cache color hint to #00000000. Any advice about this would be appreciated.

ListView xml:

<ListView xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@android:id/list"
    android:layout_width="fill_p开发者_JAVA技巧arent"
    android:layout_height="fill_parent"
    android:padding="7px"        
    android:cacheColorHint="#00000000"
    android:dividerHeight="6px"
    android:"#75ffffff"
    android:background="@drawable/list_bg"
    android:fastScrollEnabled="true"
    />

Row 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"
    />

Bitmap xml:

<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
    android:src="@drawable/list_bg_bitmap"
    android:tileMode="repeat"
    android:dither="true"
    />


try this one:

<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"
    />
0

精彩评论

暂无评论...
验证码 换一张
取 消