Interface

PageSize

This is used to determine how Pages are laid out in [Pager].

Common
interface PageSize

This is used to determine how Pages are laid out in Pager. By changing the size of the pages one can change how many pages are shown.

Please refer to the sample to learn how to use this API.

Functions

calculateMainAxisPageSize

fun Density.calculateMainAxisPageSize(availableSpace: Int, pageSpacing: Int): Int

Based on availableSpace pick a size for the pages

Parameters

availableSpace The amount of space in pixels the pages in this Pager can use.
pageSpacing The amount of space in pixels used to separate pages.