I am using SelectionTracker.Builder to multi select items in the RecyclerView. But after selecting first item, SelectionTracker selects other items on dragging too. I want to disable drag to select feature and keep only Click to select multiple items. Is there any way to it?
.withSelectionPredicate(new SelectionTracker.SelectionPredicate<String>() {
@Override
public boolean canSetStateForKey(@NonNull String key, boolean nextState) {
return true;
}
@Override
public boolean canSetStateAtPosition(int position, boolean nextState) {
return true;
}
@Override
public boolean canSelectMultiple() {
return true;
}
}).build();
I tried SelectionPredicate but this also limited the number of items that can be selected to 1.