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
Post a Comment