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

jquery - Invalid Assignment Left-Hand Side -

javascript - Preserving URL fragment through CAS sign-on -

asp.net mvc - Implementing normal user/pass, Twitter & Facebook auth -