开发者

How to change colors for ListView, alternating row color?

开发者 https://www.devze.com 2022-12-27 19:49 出处:网络
I have a couple of list views, one uses TextViews laid out with xml, the othe开发者_开发百科r uses a custom class derived from View.The default halloween color scheme is pretty ugly.How can I change t

I have a couple of list views, one uses TextViews laid out with xml, the othe开发者_开发百科r uses a custom class derived from View. The default halloween color scheme is pretty ugly. How can I change the background and selection colors for the list elements.

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

Thanks, Gerry


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

android:background for the background of your row Views, android:listSelector for the ListView list selector.

0

精彩评论

暂无评论...
验证码 换一张
取 消