dvdciri / dvdciri/MultiChoiceRecyclerView

selectAll() selects only visible items.

Open
#65 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
349
Forks
68
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.