I have a RecyclerView
with a GridLayoutManager
and a custom GridAdapter
that just handles styling, sizing, etc. It does not include any animations.
I'm observing a strange effect with the built-in RecyclerView
animations, and I'm wondering if I'm missing something.
When inserting new items / deleting items and calling notifyDataSetChanged()
, if the deleted / new item will be fully on-screen, a slide-up animation is played. However, if the item is at all off-screen, a pop animation is played. I would expect the slide-up animation to be played whenever an item is added or deleted, and at all visible.
Here's a video of the effect, it's too large to embed: https://i.imgur.com/jK4QM77.mp4
The RecyclerView
has:
setHasFixedSize(true)
setItemViewCacheSize(12)
and the adapter has:
setHasStableIds(true)
All animations / animation handling is the built in RecyclerView
default, any ideas what's going on? Thank you!