Open bemusementpark opened 8 years ago
Did you solve this?
Solved.
This was crashy:
mItems.remove(position); notifyItemRemoved(position); notifyItemRangeChanged(position, mItems.size());
Change that to this:
mItems.remove(position); //notifyItemRemoved(position); //notifyItemRangeChanged(position, mItems.size()); notifyDataSetChanged();
I added a click listener to the demo that removes the element you clicked. All elements seem to be removable except the first element, element 0.
I added a handler to postpone the removeItem call, perhaps after the click is finished being handled, but the error is the same.