You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The add animation work nicely, there is cascading effect where the items arrives one by one.
However, the remove animation is clunky: all the items are removed at the same time. I would expect the items to be removed one by one as well.
After reading the source, I noticed that BaseItemAnimator uses ViewHolder.getOldPosition() to achieve the cascading effect for remove animations. But for me, the old position is always -1, meaning the RecyclerView is not recording ViewHolder's old position.
Are there any special setup you have to do to make RecyclerView record ViewHolder's old position?
The text was updated successfully, but these errors were encountered:
Video: https://imgur.com/a/DoDWNvE
Hi, I'm using an animator like so:
The add animation work nicely, there is cascading effect where the items arrives one by one.
However, the remove animation is clunky: all the items are removed at the same time. I would expect the items to be removed one by one as well.
After reading the source, I noticed that BaseItemAnimator uses
ViewHolder.getOldPosition()
to achieve the cascading effect for remove animations. But for me, the old position is always -1, meaning the RecyclerView is not recording ViewHolder's old position.Are there any special setup you have to do to make RecyclerView record ViewHolder's old position?
The text was updated successfully, but these errors were encountered: