android - RecyclerView and IndexOutOfBoundsException: Invalid index #, size is # -
i have simple recyclerview , want remove items onclick. continuously running crash depending on when clicked on items in list above error. if you're having similar issues, here's how solved it:
public void onbindviewholder(final cardviewholder holder, final int position)
using position here useful things, if used when removing items list, causing crash, instead using:
holder.getadapterposition();
resolved issues immediately.
Comments
Post a Comment