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
Whenever selectAll() is called and recyclerview hasn't been scrolled down only visible items are select and count of selected items is also not equal to all items.
private void setUpMultiChoiceRecyclerView() {
MultiChoiceToolbar multiChoiceToolbar =
new MultiChoiceToolbar.Builder(MainActivity.this, appToolbar)
.setTitles(getString(toolbarTitle() ), "")
.build();
folderAdapter.setMultiChoiceToolbar(multiChoiceToolbar);
folderAdapter.setMultiChoiceSelectionListener(new MultiChoiceAdapter.Listener() {
@Override
public void OnItemSelected(int selectedPosition, int itemSelectedCount, int allItemCount) {
bottomBarRecyclerView.setVisibility(View.VISIBLE);
if (itemSelectedCount > 1) {
}
}
@Override
public void OnItemDeselected(int deselectedPosition, int itemSelectedCount, int allItemCount) {
if (itemSelectedCount == 0) {
bottomBarRecyclerView.setVisibility(View.GONE);
}
}
@Override
public void OnSelectAll(int itemSelectedCount, int allItemCount) {
for(int i=0;i<allItemCount;i++){
folderAdapter.select(i);
}
folderAdapter.notifyDataSetChanged();
}
@Override
public void OnDeselectAll(int itemSelectedCount, int allItemCount) {
bottomBarRecyclerView.setVisibility(View.GONE);
}
});
}
I have even tried to select individual elements in callback of onSelectAll(). Thanks.
The text was updated successfully, but these errors were encountered:
I've just tried, without scrolling, calling the selectAll() and getSelectedItemCount() method it seems like all the items are selected.
Can you please be more specific, add some logs or steps to reproduce.
Thanks
This happens only when you setup multichoice recyclerview with empty list and add elements to the list later on and notify adapter. If you setup it already populated data list, it works fine.
Whenever selectAll() is called and recyclerview hasn't been scrolled down only visible items are select and count of selected items is also not equal to all items.
I have even tried to select individual elements in callback of onSelectAll(). Thanks.
The text was updated successfully, but these errors were encountered: