Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save delacrixmorgan/1215322ebda553d26b094c3abee6d58f to your computer and use it in GitHub Desktop.
Save delacrixmorgan/1215322ebda553d26b094c3abee6d58f to your computer and use it in GitHub Desktop.
Compose - AnimatedVisibility Animation
AnimatedVisibility(
    visible = collapsed,
    enter = fadeIn(animationSpec = tween(durationMillis = 500)),
    exit = fadeOut(animationSpec = tween(durationMillis = 300)),
)

AnimatedVisibility(
    visible = collapsed,
    enter = slideInVertically(initialOffsetY = { -it }),
    exit = slideOutVertically(targetOffsetY = { -it }),
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment