Quantcast
Channel: dynamically change TextView font color in ListView - Stack Overflow
Viewing all articles
Browse latest Browse all 3

Answer by Nikita Beloglazov for dynamically change TextView font color in ListView

$
0
0

ListView reuses view, as you can see in getView you get convertView, and you only change color from white to gray. You never restore color back to white. I suggest

if (item.Read()) {
    tv.setTextColor(Color.Gray);
} else {
    tv.setTextColor(Color.White);
}

Viewing all articles
Browse latest Browse all 3

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>