How can I change colors for a ListView alternating row colors?

I have several kinds of lists, one is using TextViews laid out with xml, the other is using its own class derived from the view. The default Halloween color scheme is pretty ugly. How to change background and selection colors for list items.

Ideally, I would like to be able to do this in code, not xml, to handle the custom view.

Thanks, Gerry

+2


a source to share


1 answer


How can I change the background and selection colors for a list items.



android:background

for the background of your row Views

, android:listSelector

for the selector ListView

.

+2


a source







All Articles