I have a listview in main activity with a custom adapter class which has a text view and a checkbox in it. I can get the checked items from the code but when I set uncheck all the checkboxes from the code, it wouldn't change on the Android device LCD. Their states are unchecked from the code but still checked on the LCD!
Below code is what I have tried for unchecking the checkboxes, their states are changed but nothing is changed on the LCD.
for (int i = 0; i < ((CustomAdapter) LstExt.getAdapter()).getCount(); i++) {
View v = ((CustomAdapter)LstExt.getAdapter()).getView(i, null, LstExt);
ItemHolder b = (ItemHolder) v.getTag();
b.chkSelect.setChecked(false);
CheckBox cb = v.findViewById(R.id.Chk);
cb.setChecked(false);
}