Skip to content

Instantly share code, notes, and snippets.

@Skyyo
Created February 17, 2021 16:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Skyyo/ea3fd5c6e7da9c70fd590829cae187d3 to your computer and use it in GitHub Desktop.
Save Skyyo/ea3fd5c6e7da9c70fd590829cae187d3 to your computer and use it in GitHub Desktop.
val cardBgColor by transition.animateColor({
tween(durationMillis = EXPAND_ANIMATION_DURATION)
}) {
if (expanded) cardExpandedBackgroundColor else cardCollapsedBackgroundColor
}
val cardElevation by transition.animateDp({
tween(durationMillis = EXPAND_ANIMATION_DURATION)
}) {
if (expanded) 24.dp else 4.dp
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment