{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

LazyGridItemScope

@LazyGridScopeMarker
public sealed interface LazyGridItemScope


Receiver scope being used by the item content parameter of LazyVerticalGrid.

Summary

Public methods

abstract @NonNull Modifier

This modifier animates the item placement within the Lazy grid.

Public methods

animateItemPlacement

@ExperimentalFoundationApi
abstract @NonNull Modifier animateItemPlacement(
    @NonNull Modifier receiver,
    @NonNull FiniteAnimationSpec<@NonNull IntOffset> animationSpec
)

This modifier animates the item placement within the Lazy grid.

When you provide a key via LazyGridScope.item/LazyGridScope.items this modifier will enable item reordering animations. Aside from item reordering all other position changes caused by events like arrangement changes will also be animated.

Parameters
@NonNull FiniteAnimationSpec<@NonNull IntOffset> animationSpec

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