martmists
10/25/2023, 9:20 PMColumn(
verticalArrangement = Arrangement.Center,
modifier = Modifier.fillMaxSize(),
) {
Row { ... } // Always visible
AnimatedVisibility(..., enter=fadeIn(), exit=fadeOut()) {
Row { ... } // appears on certain actions
}
}
How do I make it so the first Row
doesn't snap to the top when the bottom row becomes visible, but instead slowly slides to the new position? (and vice versa when the bottom becomes invisible again)Francesc
10/25/2023, 10:04 PMAnimatedVisibility
uses
enter: EnterTransition = fadeIn() + expandVertically(),
exit: ExitTransition = fadeOut() + shrinkVertically(),
which will animate the height of the content if visible or invisible, which in turn will smoothly slide the first row. If you are replacing the transition with a simple fade, then you are losing the smooth expand/shrinkbrandonmcansh
10/26/2023, 12:40 AM