androidx.compose.foundation.pager
PagerDefaults
Object · from org.jetbrains.compose.foundation:foundation:1.12.2
No hand-written docs yet.
Contains the default values used by Pager.
object PagerDefaults
Properties
BeyondViewportPageCount
const val BeyondViewportPageCount: Int
The default value of beyondViewportPageCount used to specify the number of pages to compose and layout before and after the visible pages. It does not include the pages automatically composed and laid out by the pre-fetcher in the direction of the scroll during scroll events.
Functions
flingBehavior
@Composable
fun flingBehavior(
state: PagerState,
pagerSnapDistance: PagerSnapDistance = PagerSnapDistance.atMost(1),
decayAnimationSpec: DecayAnimationSpec<Float> = rememberSplineBasedDecay(),
snapAnimationSpec: AnimationSpec<Float> = spring(stiffness = Spring.StiffnessMediumLow, visibilityThreshold = Int.VisibilityThreshold.toFloat()),
snapPositionalThreshold: Float = 0.5f,
): TargetedFlingBehavior
A snapFlingBehavior that will snap pages to the start of the layout. One can use the given parameters to control how the snapping animation will happen.
pageNestedScrollConnection
@Composable
fun pageNestedScrollConnection(state: PagerState, orientation: Orientation): NestedScrollConnection
The default implementation of Pager's pageNestedScrollConnection.
Library docs
Contains the default values used by Pager.