public object PagerScaffoldDefaults
Contains default values used for HorizontalPagerScaffold and VerticalPagerScaffold.
Properties
HighSnapPositionalThreshold
public val HighSnapPositionalThreshold: Float
High SnapPositionalThreshold value, recommended for contexts where even a light or minimal gesture should trigger movement, such as navigating a long list (e.g. at least 10 items) where quick scrolling is desired.
LowSnapPositionalThreshold
public val LowSnapPositionalThreshold: Float
Recommended SnapPositionalThreshold value for screens used when the user is moving or there are a low number of screens (i.e., fewer than 10).
Example of a androidx.compose.foundation.pager.VerticalPager with a small number of pages and low sensitivity:
Example of a androidx.compose.foundation.pager.HorizontalPager with a small number of pages and low sensitivity:
FadeOutAnimationSpec
public val FadeOutAnimationSpec: AnimationSpec<Float>
The default value for the indicator fade out animation spec. Use this to fade out the page indicator when paging has stopped.
Functions
snapWithSpringFlingBehavior
@Composable
public fun snapWithSpringFlingBehavior(state: PagerState): TargetedFlingBehavior
Recommended fling behavior for pagers on Wear when using Material3, snaps at most one page at a time. This behavior is tailored for a smooth, spring-like snapping effect, enhancing the user experience with a more fluid transition between pages.
Example of using androidx.compose.foundation.pager.HorizontalPager and snapWithSpringFlingBehavior:
Example of using androidx.compose.foundation.pager.VerticalPager and snapWithSpringFlingBehavior:
Parameters
| state | The PagerState that controls the androidx.compose.foundation.pager.Pager to which this FlingBehavior will be applied to. |