PagerLayoutInfo


Contains useful information about the currently displayed layout state of a Pager. This information is available after the first measure pass.

Use PagerState.layoutInfo to retrieve this

Summary

Public properties

Int

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

Cmn
Int

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

Cmn
Int

Pages to compose and layout before and after the list of visible pages.

Cmn
Orientation

The Pager orientation.

Cmn
Int

The main axis size of the Pages in this Pager provided by the PageSize API in the Pager definition.

Cmn
Int

The spacing in pixels provided in the Pager creation.

Cmn
Boolean

True if the direction of scrolling and layout is reversed.

Cmn
SnapPosition

The calculation of how this Pager performs snapping of pages.

Cmn
Int

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

Cmn
IntSize

The size of the viewport in pixels.

Cmn
Int

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

Cmn
List<PageInfo>

A list of all pages that are currently visible in the Pager

Cmn

Public properties

afterContentPadding

val afterContentPaddingInt

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

beforeContentPadding

val beforeContentPaddingInt

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

beyondViewportPageCount

val beyondViewportPageCountInt

Pages to compose and layout before and after the list of visible pages. This does not include the pages automatically composed and laid out by the pre-fetcher in the direction of the scroll during scroll events.

orientation

val orientationOrientation

The Pager orientation.

pageSize

val pageSizeInt

The main axis size of the Pages in this Pager provided by the PageSize API in the Pager definition. This is provided in pixels.

pageSpacing

val pageSpacingInt

The spacing in pixels provided in the Pager creation.

reverseLayout

val reverseLayoutBoolean

True if the direction of scrolling and layout is reversed.

snapPosition

val snapPositionSnapPosition

The calculation of how this Pager performs snapping of pages.

viewportEndOffset

val viewportEndOffsetInt

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

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

viewportSize

val viewportSizeIntSize

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

viewportStartOffset

val viewportStartOffsetInt

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 visiblePagesInfo are fully visible.

visiblePagesInfo

val visiblePagesInfoList<PageInfo>

A list of all pages that are currently visible in the Pager