I add a listview and add some textview into it.
In the listview’s OnItemCLickListener I wanna change the textColor , then problems come:When I change the text color by setTextColor(Color.BLACK) ,the item will change to black;But when I change the color by setTextColor(R.color.mycolor) , all the items’ color will change ! I cannot understand why?
Is there any way to solve this problem?
Thanks first!
I add a listview and add some textview into it. In the listview’s OnItemCLickListener
Share
setTextColor(int)expects a “color integer”, not a “resource integer”. Try doing this instead:See docs.