liveview-native / liveview-client-jetpack

MIT License
102 stars 3 forks source link

JetPack -> Modifiers -> Animation: Modifier.animateItemPlacement( animationSpec: FiniteAnimationSpec<IntOffset> ) #226

Open AZholtkevych opened 9 months ago

AZholtkevych commented 9 months ago

Doc: https://developer.android.com/reference/kotlin/androidx/compose/foundation/lazy/staggeredgrid/LazyStaggeredGridItemScope#(androidx.compose.ui.Modifier).animateItemPlacement(androidx.compose.animation.core.FiniteAnimationSpec)

This modifier animates the item placement within the grid.

nelson-glauber commented 7 months ago

The FiniteAnimationSpec param has a few implementations: DurationBasedAnimationSpec, RepeatableSpec, and FiniteAnimationSpec. And each of them has helper functions to create instances of these objects (repeatable, infiniteRepeatable, srping, keyframes, tween, ...).