"LazyColumn/Row is the Compose equivalent of Recyc...
# compose
b
"LazyColumn/Row is the Compose equivalent of RecyclerView" ... Awesome! With RecyclerView, we can use
ListAdapter
and
DiffUtils.ItemCallback
to get automatic cool animations when items in our list change positions and are added/removed ... Is there a way to achieve this with LazyColumn?
d
Not yet. But with
AnimatedVisibility
and a decent state machine, it can be DIY'ed.
b
I think you'd need more than just
AnimatedVisibility
, for instance to handle the case when the item at position 3 moves to position 1 (it slides up, and items 1 & 2 slide down)
d
Ah true. That'll be interesting to implement.
b
yeah, I thought about trying to tackle it. But I've still got other more basic things to learn first, and I haven't even really touched animations yet at all.