What's the currently accepted method of animating ...
# compose-desktop
g
What's the currently accepted method of animating the removal/addition of items in a lazy list?
animateItemPlacement()
works sorta, it adds a tiny little animation, but doesn't animate the item below a removed item sliding up, for example.
m
There is a long-standing issue that addresses this https://issuetracker.google.com/issues/150812265. They made a lot of progress on it but still nothing ready yet. Of course when it will be ready, it should work with compose multiplatform as well.
👍 1
g
I actually just found that keying the list items to something unique and not the position makes the animations not complete, but a lot better. Things slide into place correctly now, even if the original item does just pop. As long as your items aren't too big I think it's good enough.
thank you color 1
a
Thanks for this comment!!, i was wondering for quite a while now why animation was working on android and not on desktop but somehow i missed completely that i used
key = {it.id}
on android 🤦