Updated select all button
This commit is contained in:
parent
459edefa16
commit
e2072304c9
1 changed files with 11 additions and 1 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue