Reputation: 5121
I am working on an android app and using recycleview inside a fragment. I am having a number of items in this recycleview and having a option to delete the items as well from recyclerview.
I want that when I delete any item, it should be removed from the recyclerview and the lower item should have a effect of slide up, so that the users can see that the current item has been removed and the next item now takes the position of last item.
So, I want to apply slide up effect on the recyclerview item. Please help me if anyone know how can I do this.
Thanks a lot in advanced. :)
Upvotes: 1
Views: 1476
Reputation: 503
Just call notifyItemRemoved(position) with the position of the removed item and the recycler view will automatically show the animation.
Upvotes: 2