Status Update
Comments
ti...@google.com <ti...@google.com>
an...@google.com <an...@google.com> #2
If you use Modifier.animateItem() and remove an item from the LazyColumn, and the last item is visible, that last item will show a weird animation where it looks like the item is being temporarily cut off.
The issue here is that the list is using "wrap content" height. Also lists are clipping its content as any scrollable containers. When you remove some item, then we immediately have less items to display so the height needed to wrap the content became smaller. It results in the last item being clipped. It would be nice for us to automatically make this case to look nicer, but it might be unexpected behaviour in some use cases. For now we recommend to not use wrap content in such cases. Just applying Modifier.fillMaxHeight() on LazyColumn will resolve that.
I would expect the fade out animation to run first and then the following item to slide up.
It is not how it works, both fade and slide animations are in parallel. As you have a very long fade out animation in your example the disappearing item is fully covered with a new item moved into this position before you can notice that the item is fading out. If, for example you set the animation with the same duration as "placementSpec" then it will look reasonable. You can also play with adding "delayMillis" param for your tween spec passed as placementSpec in order to delay the start of the slide animation so it looks like the slide happens after the fade out animation.
Description
I also noticed that the fade out animation can only be seen when removing the last element, which doesn't make sense to me. I would expect the fade out animation to run first and then the following item to slide up
Jetpack Compose version: 1.7.0-beta01
Jetpack Compose component used: LazyColumn
Steps to Reproduce or Code Sample to Reproduce:
1. Launch the app
2. Tap on some items to remove them and look at the last item