I have RecyclerView.Adapter class with the function:
private void removeItem(int position) {
data.remove(position);
notifyItemRemoved(position);
//notifyItemRangeChanged(position, data.size());
}
Do we also need to call the notifyItemRangeChanged
function after notifyItemRemoved
? I found a few tutorials/posts where peopole was using both of them but code works ok with notifyItemRemoved
only.