Interface

ScalingLazyListLayoutInfo

Contains useful information about the currently displayed layout state of ScalingLazyColumn.

Source set: Android

Deprecated

Was moved to androidx.wear.compose.foundation.lazy package. Please use it instead

public sealed interface ScalingLazyListLayoutInfo

Contains useful information about the currently displayed layout state of ScalingLazyColumn. For example you can get the list of currently displayed item.

Use ScalingLazyListState.layoutInfo to retrieve this

Properties

visibleItemsInfo

Source set: Android
public val visibleItemsInfo: List<ScalingLazyListItemInfo>

The list of ScalingLazyListItemInfo representing all the currently visible items.

viewportStartOffset

Source set: Android
public val viewportStartOffset: Int

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.

viewportEndOffset

Source set: Android
public val viewportEndOffset: Int

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 scaling lazy list layout minus beforeContentPadding.

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

totalItemsCount

Source set: Android
public val totalItemsCount: Int

The total count of items passed to ScalingLazyColumn.

viewportSize

Source set: Android
public val viewportSize: IntSize

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

orientation

Source set: Android
public val orientation: Orientation

The orientation of the scaling lazy list.

reverseLayout

Source set: Android
public val reverseLayout: Boolean

True if the direction of scrolling and layout is reversed.

beforeContentPadding

Source set: Android
public val beforeContentPadding: Int

The content padding in pixels applied before the first item in the direction of scrolling. For example it is a top content padding for ScalingLazyColumn with reverseLayout set to false.

afterContentPadding

Source set: Android
public val afterContentPadding: Int

The content padding in pixels applied after the last item in the direction of scrolling. For example it is a bottom content padding for ScalingLazyColumn with reverseLayout set to false.

beforeAutoCenteringPadding

Source set: Android
public val beforeAutoCenteringPadding: Int

The auto centering padding in pixels applied before the first item in the direction of scrolling. For example it is a top auto centering padding for ScalingLazyColumn with reverseLayout set to false.

afterAutoCenteringPadding

Source set: Android
public val afterAutoCenteringPadding: Int

The auto centering padding in pixels applied after the last item in the direction of scrolling. For example it is a bottom auto centering padding for ScalingLazyColumn with reverseLayout set to false.

Last updated: