ListLayoutInfo


public interface ListLayoutInfo


Information about the layout of the VerticalList.

Summary

Public methods

abstract int

The content padding in pixels applied after the last item in the direction of scrolling.

abstract int

The content padding in pixels applied before the first item in the direction of scrolling.

abstract int
abstract @NonNull Orientation

The orientation of the list.

abstract boolean

True if the direction of scrolling and layout is reversed.

abstract int

The total count of items passed to VerticalList.

abstract int

The end offset of the layout's viewport in pixels.

abstract @NonNull IntSize

The size of the viewport in pixels.

abstract int

The start offset of the layout's viewport in pixels.

abstract @NonNull List<@NonNull LazyListItemInfo>

The list of LazyListItemInfo representing all the currently visible items.

Public methods

getAfterContentPadding

Added in 1.0.0-alpha01
abstract int getAfterContentPadding()

The content padding in pixels applied after the last item in the direction of scrolling.

getBeforeContentPadding

Added in 1.0.0-alpha01
abstract int getBeforeContentPadding()

The content padding in pixels applied before the first item in the direction of scrolling.

getMainAxisItemSpacing

Added in 1.0.0-alpha01
abstract int getMainAxisItemSpacing()

getOrientation

Added in 1.0.0-alpha01
abstract @NonNull Orientation getOrientation()

The orientation of the list.

getReverseLayout

Added in 1.0.0-alpha01
abstract boolean getReverseLayout()

True if the direction of scrolling and layout is reversed.

getTotalItemsCount

Added in 1.0.0-alpha01
abstract int getTotalItemsCount()

The total count of items passed to VerticalList.

getViewportEndOffset

Added in 1.0.0-alpha01
abstract int getViewportEndOffset()

The end offset of the layout's viewport in pixels. You can think of it as a maximum offset which would be visible. It is the size of the list layout minus beforeContentPadding.

You can use it to understand what items from visibleItemsInfo are fully visible.

getViewportSize

abstract @NonNull IntSize getViewportSize()

The size of the viewport in pixels. It is the list layout size including all the content paddings.

getViewportStartOffset

Added in 1.0.0-alpha01
abstract int getViewportStartOffset()

The start offset of the layout's viewport in pixels. You can think of it as a minimum offset which would be visible. Usually it is 0, but it can be negative if non-zero beforeContentPadding was applied as the content displayed in the content padding area is still visible.

You can use it to understand what items from visibleItemsInfo are fully visible.

getVisibleItemsInfo

Added in 1.0.0-alpha01
abstract @NonNull List<@NonNull LazyListItemInfogetVisibleItemsInfo()

The list of LazyListItemInfo representing all the currently visible items.