android - Changing List View Selected Row Color -


hey guys struggling past 4 days problem , no full solution given done issue , want share code you.

are looking this?

linearlayout newrow = new linearlayout(getbasecontext()); newrow.setorientation(linearlayout.horizontal); if(i % 2 != 0) {     newrow.setbackgroundcolor(res.getcolor(/* color here: e.g., r.color.rowcols*/)); }   

using in loop i incrementer, can change every other row add different color. used linearlayouts , added things them (then added linearlayouts scrollable parent linearlayout), similar approach should accomplishable listviews.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -