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

LazyStaggeredGridItemInfo

public sealed interface LazyStaggeredGridItemInfo


Information about layout state of individual item in lazy staggered grid.

See also
LazyStaggeredGridLayoutInfo

Summary

Public methods

abstract Object

The content type of the item which was passed to the item() or items() function.

abstract int

Index of the item.

abstract @NonNull Object

Key of the item passed in LazyStaggeredGridScope.items

abstract int

Column (for vertical staggered grids) or row (for horizontal staggered grids) that the item is in.

abstract @NonNull IntOffset

Relative offset from the start of the staggered grid.

abstract @NonNull IntSize

Item size in pixels.

Public methods

getContentType

abstract Object getContentType()

The content type of the item which was passed to the item() or items() function.

getIndex

abstract int getIndex()

Index of the item.

getKey

abstract @NonNull Object getKey()

Key of the item passed in LazyStaggeredGridScope.items

getLane

abstract int getLane()

Column (for vertical staggered grids) or row (for horizontal staggered grids) that the item is in.

getOffset

abstract @NonNull IntOffset getOffset()

Relative offset from the start of the staggered grid.

getSize

abstract @NonNull IntSize getSize()

Item size in pixels. If item contains multiple layouts, the size is calculated as a sum of their sizes.