Tom Truyen
05/07/2024, 9:45 AMRow(
modifier = Modifier.fillMaxSize()
) {
cards.forEach { card ->
Card(
modifier = Modifier.weight(card.animationWeight.value) // 1f by default, could become 3f if in an "expanded" state
) {
// Other content
}
}
}
Doris Liu
05/07/2024, 5:10 PMTom Truyen
05/07/2024, 5:11 PMZach Klippenstein (he/him) [MOD]
05/07/2024, 5:36 PMDoris Liu
05/07/2024, 5:48 PManimateBounds
modifier. It's something that we are currently building, here's a simplified version of it: https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:compose/[…]mpose/animation/demos/lookahead/AnimateBoundsModifier.kt;l=46
You could do Modifier.animateBounds(Modifier.weight(if... 1f else 3f))
Tom Truyen
05/07/2024, 5:53 PM