Problem with indexing in RecyclerView Adapter. How to do it in a good way?
问题 I have some problems with RecyclerView Adapter. I want to do the list with id index: 1,2,3... When an item is removed it should set every next item position to position-1. Like this: (for example delete number 3) 1|2|3|4|5 -> 1|2|3|4 It works perfectly when: @Override public long getItemId(int position) { return position; } @Override public int getItemViewType(int position) { return position; } But this causes other errors with notifyItemRemoved() . When I set: @Override public long getItemId