The RecyclerView
takes care of adding, removing, and re-ordering animations!
This simple AndroidStudio project features a RecyclerView
.
For the animations to work, it is very important for the RecyclerView.Adapter
implementation to:
- call (most likely in the constructor)
setHasStableIds(true)
. - override the
getItemId(int position)
method to return a unique ID for each item at the specifiedposition
.
圆满解决问题。