Updated select all button

This commit is contained in:
Denis 2015-04-10 15:18:55 +03:00
parent 459edefa16
commit e2072304c9

View file

@ -73,7 +73,7 @@ public class EditPOIFilterActivity extends OsmandListActivity {
if (selectAll.isChecked()) {
selectAll();
} else {
//deselectAll();
deselectAll();
}
}
});
@ -254,6 +254,16 @@ public class EditPOIFilterActivity extends OsmandListActivity {
}
}
private void deselectAll(){
AmenityAdapter adapter = getListAdapter();
int count = adapter.getCount();
for (int i =0; i< count; i++) {
filter.setTypeToAccept(adapter.getItem(i), false);
}
ListView lv = EditPOIFilterActivity.this.getListView();
lv.deferNotifyDataSetChanged();
}
@Override
public AmenityAdapter getListAdapter() {
return (AmenityAdapter) super.getListAdapter();