use of net.osmand.plus.search.listitems.QuickSearchSelectAllListItem in project Osmand by osmandapp.
the class QuickSearchListAdapter method setSelectionMode.
public void setSelectionMode(boolean selectionMode, int position) {
this.selectionMode = selectionMode;
selectAll = false;
selectedItems.clear();
if (position != -1) {
QuickSearchListItem item = getItem(position);
selectedItems.add(item);
}
if (selectionMode) {
QuickSearchSelectAllListItem selectAllListItem = new QuickSearchSelectAllListItem(app, null, null);
insertListItem(selectAllListItem, 0);
if (selectionListener != null) {
selectionListener.onUpdateSelectionMode(selectedItems);
}
} else {
if (selectionListener != null) {
selectionListener.reloadData();
}
}
// notifyDataSetInvalidated();
}
Aggregations