Set background of ListView using drawable

To set background of istView to drawable, simple add "android:background" property in ListView to specify the background. And add "android:cacheColorHint" propertity also, otherwise, the background will become abnormal while scrolling.

exampe:
<ListView  
android:id="@+id/list"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@drawable/icon"
android:cacheColorHint="#00000000" />


Set background of ListView using drawable


0 Response to "Set background of ListView using drawable"

Posting Komentar