Error delete multiple item
AeternumZero opened this issue · 1 comments
I want to implement delete multiple item. how to do that? thanks
implement a method in sectioned recycler view adapter class which is present in sectioned recyclerview module. For multiple item selection and then remove the selected items from recycler view.
I had done this which worked for me.
In SectionRecyclerViewAdapter class
public void RemoveChildren(int sectionPosition,Object child){
if (sectionPosition > sectionItemList.size() - 1 || sectionPosition < 0)
throw new IndexOutOfBoundsException("Invalid sectionPosition = " + sectionPosition + " , Size is " + sectionItemList.size());
// sectionItemList.get(sectionPosition).getChildItems().remove(child);
sectionItemList.get(sectionPosition).getSelectedItems();
notifyDataChanged(sectionItemList);
}
and in your activity
adapterRecycler.RemoveChildren(i, s);
this works for me but you have to look into the module for better understanding.