出於某種原因,每當我滾動瀏覽項目列表時,我的列表視圖中的背景消失並重新出現,導致我不想要的「閃爍」效果。我試過這個建議:How to make a ListView transparent in Android?,但由於某種原因它不起作用。有什麼建議麼?Android:ListView閃爍效果。有關如何擺脫這一點的任何提示?
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/screenLayout"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/background"
>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:background="@color/title_background"
android:text="@string/whatsnew_title"
>
</TextView>
<ListView
android:id="@android:id/list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
</ListView>
</LinearLayout>
真棒...你不會相信我。 ..我試圖附加cacheColorHint,但我發現每一個資源說:android:cacheColorHint =「#000000」(注意零的數量顯然沒有說阿爾法)...現在它的作品完全按照我想要的...謝謝你很多! – Legend 2009-10-09 17:16:43
偉大的答案男人。 – 2012-01-11 13:01:21
偉大和簡短的迴應和少數!謝謝 – 2012-07-19 11:40:57