LazyStaggeredGridItemScope


Receiver scope for itemContent in LazyStaggeredGridScope.item

Summary

Public functions

Modifier

This modifier animates the item placement within the grid.

Cmn

Public functions

animateItemPlacement

@ExperimentalFoundationApi
fun Modifier.animateItemPlacement(
    animationSpec: FiniteAnimationSpec<IntOffset> = spring( stiffness = Spring.StiffnessMediumLow, visibilityThreshold = IntOffset.VisibilityThreshold )
): Modifier

This modifier animates the item placement within the grid.

When you scroll backward staggered grids could move already visible items in order to correct the accumulated errors in previous item size estimations. This modifier can animate such moves.

Aside from that when you provide a key via LazyStaggeredGridScope.item / LazyStaggeredGridScope.items this modifier will enable item reordering animations.

Parameters
animationSpec: FiniteAnimationSpec<IntOffset> = spring( stiffness = Spring.StiffnessMediumLow, visibilityThreshold = IntOffset.VisibilityThreshold )

a finite animation that will be used to animate the item placement.