RecylerView.Adapter - notifyItemRemoved and notifyItemRangeChanged?

387 views Asked by At

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.

0

There are 0 answers