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

clhols

10/26/2021, 3:27 PM
I have a Composable that is taller than the screen. I would like to animate it in using:
Copy code
AnimatedVisibility(enter = slideInVertically()) {}
But the Composable get clipped by the screen height, so you only get to see the top part of it when it animates in. The Composable is scrollable, so my guess is that it is animating using the height of the scroll container and not the content. So I need the full content laid out when animating in but still scrollable afterwards. Any ideas on how to accomplish that?
a

Adam Powell

10/26/2021, 6:31 PM
animate resizing your scrolling container rather than translation of it alone
👍 1
c

clhols

10/27/2021, 1:21 PM
I would have to set rememberScrollState(Int.MAX_VALUE) to see the bottom of the content during the resize animation and then when the resize animation finishes continue with a scroll animation to the top of the content. It will make it hard to coordinate those two animations with a common Easing. Another idea could be to add a screen size of padding below the content, only do the scrolling animation and remove the padding after the animation.
4 Views