Skip to content

Instantly share code, notes, and snippets.

View abircse's full-sized avatar
🏠
Working from My Workstation

Nayeem Shiddiki Abir abircse

🏠
Working from My Workstation
View GitHub Profile
@abircse
abircse / cardanimation.kt
Created May 2, 2024 02:47 — forked from bharath914/cardanimation.kt
Quick Card Animation in Jetpack Compose
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
@abircse
abircse / FlipCard.kt
Created April 21, 2024 14:32 — forked from mo7amd89/FlipCard.kt
Flip Card with Jetpack Compose
@Composable
fun FlipActionScreen() {
var flippedState by remember { mutableStateOf(false) }
val rotationY by animateFloatAsState(
targetValue = if (flippedState) 180f else 0f,
animationSpec = spring(
dampingRatio = Spring.DampingRatioHighBouncy,
stiffness = Spring.StiffnessVeryLow
)
)