Android:About listview's item color -
i add listview , add textview it. in listview's onitemclicklistener wanna change textcolor , problems come:when change text color settextcolor(color.black) ,the item change black;but when change color settextcolor(r.color.mycolor) , items' color change ! cannot understand why? there way solve problem? first!
settextcolor(int) expects "color integer", not "resource integer". try doing instead:
settextcolor(getresources().getcolor(r.color.mycolor)); see docs.
Comments
Post a Comment