I have a listview with custom BaseAdapter and each row contains a checkbox and three textviews. I am using Layoutinflater to inflate this row from a xml file. However, everytime I check one checkbox, many other checkboxes get checked in the whole list, whereas the original checkbox I wanted to check sometimes gets checked itself, and sometimes it does not.
Every time a user selects a checkbox, I am storing that checkbox's attached unique value in a collection. Next time the getView method is called, I manually check/uncheck the checkbox before returning the view inside getView() based on if the checkbox's value was already in the collection or not. But despite doing this, it is still marking off those checkboxes, even though the checkedchangelistener for those checkboxes is not firing up. I am doubtful this due to views getting reused in getView, but dont know what is a good way to get this whole thing to work.