Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set color of 'empty' area of ListView in Android

When my list view is not completely full of list view items (ex my list view is tall enough for 8 items, but I only have 2), the empty area shows up as gray on my Droid X. In the emulator the empty area shows up as black.

How do I set the 'empty' area to transparent?

I've tried setting the background color, cache hints, but those only seem the change the background color of the listview where it has items, not the empty area.

like image 403
Curtis Shipley Avatar asked Jun 28 '11 14:06

Curtis Shipley


1 Answers

Motorola used to have a blog post up about this behavior, but their blog is no longer online -- the answer is that on Motoblur 2.3, they set a default overscroll footer, which is fixable by setting android:overScrollFooter="@null", but only for Android 2.3+.

Their recommended app-wide solution is to use a custom theme with a custom listViewStyle set only in the values-v10 folder with that property set.

like image 110
Yoni Samlan Avatar answered Nov 15 '22 21:11

Yoni Samlan