Open DS-Dj opened 7 years ago
Managed to find a work around, but still has crashes when a section has been removed and removing the last item in the list. For anyone who is stuck try this code
int i = getAdapterPosition();
int sectionIndex = getSectionForAdapterPosition(i);
int itemIndex = getPositionOfItemInSection(sectionIndex, i);
Hey, Are you going to fix this issue?
I have a list view which I want to remove items from when the user interacts.
The code I am running is like this:
The problem I am having is
getPositionInSection()
does not return the correct index after removing items from the list, it seems that the value returns is set when the view holder is bound and never changed. Meaning on successive clicks on different list items causes indexOutOfBounds exception. Any help would be appreciated.