https://kotlinlang.org logo
#compose
Title
# compose
b

Bradleycorn

01/09/2021, 3:49 PM
"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

Dominaezzz

01/09/2021, 4:38 PM
Not yet. But with
AnimatedVisibility
and a decent state machine, it can be DIY'ed.
b

Bradleycorn

01/09/2021, 4:41 PM
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

Dominaezzz

01/09/2021, 4:43 PM
Ah true. That'll be interesting to implement.
b

Bradleycorn

01/09/2021, 4:44 PM
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.