RecycleView Adapter notifyItemRangeInserted reload all rows after start position

2.2k views Asked by At

I'm trying to add a some new rows (items) in my RecyclerView.Adapter. After I added them in the ArrayList, I'm calling notifyItemRangeInserted(changeIndexStart, newItemsAdded); where

changeIndexStart = is the index where the first element was inserted
newItemsAdded = how many new rows was inserted

So if I have some thing like:

mItems.add(item1); // position 0 
mItems.add(item2); // position 1
mItems.add(item3); // position 2 
mItems.add(item4); // position 3

If I add mItems.add(2, item5); mItems.add(3, item6); and call notifyItemRangeInserted(2, 1);all the items after position 2 will be refreshed (an animation is applied on them).

Is there a way that only my new rows to have the animation?

1

There are 1 answers

2
Mosa On

i don't think , because animation will applied to all item in the recyclerview