所以我通過一個適配器使用自定義列表視圖,並且在我的Nexus 7上一切看起來都很棒,但是在我的HTC Incredible 2上我遇到了一個問題,我的背景顏色改變了。這是我用cacheColorHint設置的XML文件。我也嘗試過#AA00000。有什麼建議麼?我也嘗試通過setCacheColorHint在活動中設置它,但沒有任何工作。Android ListView滾動顏色變化 - colorCacheHint沒有修復問題
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="10dp"
android:background="#AA000000"
android:cacheColorHint="#00000000">
<ImageView android:id="@+id/ExhibitListIcon"
android:contentDescription="Exhibit List Icon"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:gravity="center_vertical"
android:layout_marginRight="15dp"
android:layout_marginTop="5dp"
android:layout_marginBottom="5dp" />
<TextView android:id="@+id/ExhibitListTitle"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="center"
android:textStyle="bold"
android:textSize="22dp"
android:textColor="#FFFFFF"
android:layout_marginTop="5dp"
android:layout_marginBottom="5dp" />
</LinearLayout>
這做到了!非常感謝你。 –
很高興我可以幫助....你可以接受這個答案,如果它的作品:) –
完成並完成。再次感謝。 –