jax wrote: > I have subclassed ArrayAdapter to set the color of text to RED if the > string does not contain 100%, this has been added to a ListView. The > problem is that some of the rows show as red when they contain 100%. > Why would this happen?
You are recycling rows but not resetting their color. Hence, over time, most if not all of your rows will be red. > if(!item.contains("100%")) { > tv.setTextColor(Color.RED); > } In the above code snippet, also handle the "else" branch and reset the color to its normal state. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android App Developer Books: http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en