Monday, 18 June 2012

Android: Motorola Issue with Listview

Motorola Droid X and maybe other models, have an issue with ListView that you will not see the background when you don't have an item inside.

On this link you can follow the discussion and the solution, if you don't want to read all the thread and understand how to fix the problem, you can read below how fix it.

Solution:
On your ListView you need to add four parameters that makes your ListView transparent when you dont have any items

Layout

android:background="@color/transparent"
android:cacheColorHint="@color/transparent"
android:descendantFocusability="afterDescendants"           
android:overScrollFooter="@null"

Color reference
<color name="transparent">#00000000</color>

No comments:

Post a Comment