PageIndicatorState


interface PageIndicatorState


An interface for connection between Pager and HorizontalPageIndicator.

Summary

Public functions

@FloatRange(from = 0.0) Float

The currently selected page index with offset fraction.

Public properties

Int

Total number of pages

Public functions

selectedPageWithOffsetFraction

Added in 1.0.0-alpha21
fun selectedPageWithOffsetFraction(): @FloatRange(from = 0.0) Float

The currently selected page index with offset fraction. Integer part represents the selected page index and the fractional part represents the offset as a fraction of the transition from the selected page to the next page in the range 0f..1f

For example 5.5f equals to selectedPage = 5, offset 0.5f

It changes when a scroll (drag, swipe or fling) happens between pages in Pager.

Public properties

pageCount

Added in 1.0.0-alpha21
val pageCountInt

Total number of pages