Open oktayayar opened 9 years ago
I debugged the codes again and I realized that animateRemove() method in ItemAnimator class is not called. What could cause that issue? (I call notifyItemRemoved() method when an item is removed from dataset)
I have this problem too! The adding animation works but removing does not. I'm using RecyclerView version 22.2.1
Well I think it is solved for me now.
The problem was that I was calling notifyDataSetChanged()
right after adapter.remove(position)
and it was cancelling the animation.
My solution was to call notifyItemChanged(position)
instead of notifyDataSetChanged()
before calling adapter.remove(position)
and it is solved now.
I have following codes:
RecyclerView mailList; ....... mailList.setItemAnimator(new SlideInRightAnimator()); mailList.getItemAnimator().setAddDuration(200); mailList.getItemAnimator().setRemoveDuration(200); ......
Although addition animation is woking, removal animation is not working