Question

I'm currently working on an android application that uses a SimpleCursorAdapter with a custom ViewBinder to set specific text color and image visibility on items in my ListView.

However, when my list is longer then the size of a screen, and the user scrolls up and down, the system causes incorrect rows to take on the wrong coloring, etc. My understanding is that this is an issue of the system re-using views as an optimization in scrolling, as explained here.

I'm all for optimization, however I need items to display properly in the ListView. What is the correct way to go about this?

My thinking is that I could implement a CursorAdapter, or preferably a SimpleCursorAdapter, but I don't know how to go about doing so. Alternatively, is it just a matter of setting text color back to its default in my ViewBinder?

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top