开发者

Listview item color

My list view is a multiple selection list view. i have to show the selected list view items in one color(say green) and the other ite开发者_C百科ms in some other color(red). How to achieve this?


It depends what you mean by showing "items in [...] color." The easiest way to change items' colors is to do it in the Adapter's getView() or bindView() method.


In the onItemSelectListner change the item background to whichever you need.


You could call the setBackgroundColor() method in the select event to change the background color.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜