how can i uncheck all the CheckBoxes of a ListView? I'm extending a ArrayAdapter and i've already tried something like:
private void listCheckBoxesState(boolean select) {
final ListView list = getListView(开发者_StackOverflow);
for(int i=0;i<getListAdapter().getCount();i++) {
list.setItemChecked(i, select);
}
}
And it doesn't work! :(
Update all of your item
s and then call notifyDatasetChanged
. You can do this in a method inside of your Adapter so it's more transparent for your activity.
have you tried? unchecks it for me on all boxes
for(int i=0;i<getListAdapter().getCount();i++) {
list.setItemChecked(i, false);
}
精彩评论