2012-09-17

Listview background color for Moto Droid X

Moto Droid X or Droid 3 had made a change for listview background color after Gingerbread update.
So there will be displsay issue, if you didn’t handle the background color
For example: a huge white blank below the list.


Solution:
          For listview, add overScrollFooter color
<ListView …
        android:overScrollFooter="@color/black">
</ListView>
          If you're using background picture, just set...
android:layout_height="wrap_content"
          instead of match_parent

          For PreferenceScreen, cannot access listview in xml, so you need to add code in your Activity.
getListView().setOverscrollFooter(getResources().getDrawable(R.color.black))
          Please notice this setOverscrollFooter need to use SDK version 9

Result:

No comments: