Compose Unstyled 2.0 is out! Check the official announcement blog ->
Compose Component

OneHandedGestureVerticalPageIndicator

A vertical page indicator that can temporarily display a gesture indicator to demonstrate how to navigate between pages using one-handed gestures.

OneHandedGestureVerticalPageIndicator

Source set: Android
@Composable
public fun OneHandedGestureVerticalPageIndicator(
    gestureIndicatorVisible: Boolean,
    onGestureIndicatorFinished: () -> Unit,
    pagerState: PagerState,
    modifier: Modifier = Modifier,
    selectedColor: Color = PageIndicatorDefaults.selectedColor,
    unselectedColor: Color = PageIndicatorDefaults.unselectedColor,
    backgroundColor: Color = PageIndicatorDefaults.backgroundColor,
    gestureIndicatorTint: Color = MaterialTheme.colorScheme.onTertiary,
    gestureIndicatorBackgroundColor: Color = MaterialTheme.colorScheme.tertiary,
)

Parameters

gestureIndicatorVisible A boolean flag that triggers the gesture indicator animation. While true, the standard scroll indicator is transformed into the gesture indicator.
onGestureIndicatorFinished A lambda function to be called when the gesture indicator animation sequence finishes. Implementation of this lambda must reset gestureIndicatorVisible to false in order to restore the original content.
pagerState The state of the androidx.wear.compose.foundation.pager.VerticalPager that this indicator represents.
modifier Modifier to be applied to the VerticalPageIndicator
selectedColor The color which will be used for a selected indicator item.
unselectedColor The color which will be used for an unselected indicator item.
backgroundColor The color which will be used for an indicator background.
gestureIndicatorTint The color which will be used for a tint of the gesture animation icon.
gestureIndicatorBackgroundColor The color which will be used for a background behind the gesture animation.

Last updated: