https://kotlinlang.org logo
#compose-desktop
Title
# compose-desktop
g

Garret Yoder

03/18/2024, 4:10 PM
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

MR3Y

03/18/2024, 5:16 PM
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

Garret Yoder

03/18/2024, 5:24 PM
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.