i´m in trouble with a custom Listview and (Checkboxes or Button). I follow a guide (the android devolopers´s cookbook) and my custom Listview show correctly. An visisble Error occured when selected Checkboxes are scrolling.(Wrong Checkboexes are checked)
I followed the guide on
http://www.vogella.de/articles/AndroidListView/article.html#listviews_performance
but it doesn´t work. How to save the state correctly?
Greeting
Andreas
You will have to save the checked items in a list variable (in your Adapter subclass) and set the correct state (checked/unchecked) depending upon whether the item is present in the list variable.
Add/remove an item from the list variable:
Set the correct state of the checkbox: