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.
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.