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

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -