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

LazyGridSnapLayoutInfoProviderKt

public final class LazyGridSnapLayoutInfoProviderKt


Summary

Public methods

static final @NonNull SnapLayoutInfoProvider

A SnapLayoutInfoProvider for LazyGrids.

Public methods

SnapLayoutInfoProvider

@ExperimentalFoundationApi
public static final @NonNull SnapLayoutInfoProvider SnapLayoutInfoProvider(
    @NonNull LazyGridState lazyGridState,
    @NonNull SnapPositionInLayout positionInLayout
)

A SnapLayoutInfoProvider for LazyGrids.

Parameters
@NonNull LazyGridState lazyGridState

The LazyGridState with information about the current state of the grid

@NonNull SnapPositionInLayout positionInLayout

The desired positioning of the snapped item within the main layout. This position should be considered with regards to the start edge of the item and the placement within the viewport.