You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I got a use case that clicks item once activates(selects) it and clicks it twice deactivates(deselects) it. But due to the source of 'SelectableAdapter.toggleSelection()':
public void toggleSelection(int position) {
if (position < 0) {
return;
}
if (mMode == SINGLE) {
clearSelection();
}
boolean contains = mSelectedPositions.contains(position);
if (contains) {
removeSelection(position);
} else {
addSelection(position);
}
log.v("toggleSelection %s on position %s, current %s",
(contains ? "removed" : "added"), position, mSelectedPositions);
}
If in SINGLE mode, item in 'position' can only be selected but toggled. I try to override, but many members are 'private' in 'SelectableAdapter' and 'FlexibleAdapter'.
Will toggle selection in SINGLE mode be supported in furture verson by introducing new field member something like 'toggleSelectionInSingleMode'? Thanks.
The text was updated successfully, but these errors were encountered:
I got a use case that clicks item once activates(selects) it and clicks it twice deactivates(deselects) it. But due to the source of 'SelectableAdapter.toggleSelection()':
public void toggleSelection(int position) {
if (position < 0) {
return;
}
if (mMode == SINGLE) {
clearSelection();
}
boolean contains = mSelectedPositions.contains(position);
if (contains) {
removeSelection(position);
} else {
addSelection(position);
}
log.v("toggleSelection %s on position %s, current %s",
(contains ? "removed" : "added"), position, mSelectedPositions);
}
If in SINGLE mode, item in 'position' can only be selected but toggled. I try to override, but many members are 'private' in 'SelectableAdapter' and 'FlexibleAdapter'.
Will toggle selection in SINGLE mode be supported in furture verson by introducing new field member something like 'toggleSelectionInSingleMode'? Thanks.
The text was updated successfully, but these errors were encountered: