Pager State
@Stable()
Content copied to clipboard
A state object that can be hoisted to control and observe scrolling for HorizontalPager.
In most cases, this will be created via rememberPagerState.
Parameters
currentPage
the initial value for PagerState.currentPage
Constructors
PagerState
Link copied to clipboard
the initial value for PagerState.currentPage
Types
Functions
animateScrollToPage
Link copied to clipboard
suspend fun animateScrollToPage(@IntRange(from = 0.toLong() ) page: Int, @FloatRange(from = -1.0.toDouble(), to = 1.0.toDouble() ) pageOffset: Float = 0f)
Content copied to clipboard
suspend fun animateScrollToPage(@IntRange(from = 0.toLong() ) page: Int, @FloatRange(from = 0.0.toDouble(), to = 1.0.toDouble() ) pageOffset: Float = 0f, animationSpec: AnimationSpec<Float> = spring(), initialVelocity: Float = 0f, skipPages: Boolean = true)
Content copied to clipboard
dispatchRawDelta
Link copied to clipboard
scrollToPage
Link copied to clipboard
suspend fun scrollToPage(@IntRange(from = 0.toLong() ) page: Int, @FloatRange(from = -1.0.toDouble(), to = 1.0.toDouble() ) pageOffset: Float = 0f)
Content copied to clipboard
Instantly brings the item at page to the middle of the viewport.
Properties
canScrollBackward
Link copied to clipboard
canScrollForward
Link copied to clipboard
currentPage
Link copied to clipboard
currentPageOffset
Link copied to clipboard
The current offset from the start of currentPage, as a ratio of the page width.
interactionSource
Link copied to clipboard
isScrollInProgress
Link copied to clipboard
targetPage
Link copied to clipboard