I\'m suffering from the same issue as this question: Wrong item checked when filtering ListView in android
As suggested in the above question, I have an Hashset hold
Solved the issue. As suggested in the question I added to mine, when you populate the checkboxes, the other List/Hashset should determine whether to mark item as checked or not.
Using my code:
//first you will need to get the current item ID
String bookmarkID = cursor.getString(0);
//Then, check if the current ID is in the selectedIds hash/list
//If true - mark current item view as checked, else - uncheck.
CheckedTextView markedItem = (CheckedTextView) row.findViewById(R.id.btitle);
if (selectedIds.contains(new String(bookmarkID))) {
markedItem.setChecked(true);
} else {
markedItem.setChecked(false);
}
Really hope this will help anyone! :)