-
-
Save abircse/cd54a0197372c8116ffb2c0ac681de04 to your computer and use it in GitHub Desktop.
Quick Card Animation in Jetpack Compose
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val animatable = remember { | |
Animatable(0.5f) | |
} | |
LaunchedEffect(key1 = true) { | |
animatable.animateTo(1f, tween(350, easing = FastOutSlowInEasing)) | |
// you can tweak out and customize these animations. | |
} | |
// add this animatable to your card's modifier graphics layer. | |
BookItem(modifier = cardMod.graphicsLayer { | |
this.scaleX = animatable.value | |
this.scaleY = animatable.value | |
}, entity = item) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment