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

OneHandedGestureScrollIndicator

A scroll indicator that transitions to indicate that a scroll gesture is available to the user.

OneHandedGestureScrollIndicator

Source set: Android
@Composable
public fun OneHandedGestureScrollIndicator(
    gestureIndicatorVisible: Boolean,
    onGestureIndicatorFinished: () -> Unit,
    state: TransformingLazyColumnState,
    modifier: Modifier = Modifier,
    scrollIndicatorColors: ScrollIndicatorColors = ScrollIndicatorDefaults.colors(),
    gestureIndicatorTint: Color = MaterialTheme.colorScheme.onTertiary,
    gestureIndicatorBackgroundColor: Color = MaterialTheme.colorScheme.tertiary,
    reverseDirection: Boolean = false,
    positionAnimationSpec: AnimationSpec<Float> = ScrollIndicatorDefaults.PositionAnimationSpec,
)

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.
state The state object of the androidx.wear.compose.foundation.lazy.TransformingLazyColumn this indicator is coupled with.
modifier The Modifier to be applied to the scroll indicator.
scrollIndicatorColors ScrollIndicatorColors that will be used to resolve the indicator and track colors for this androidx.wear.compose.material3.ScrollIndicator.
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.
reverseDirection Reverses direction of ScrollIndicator if true.
positionAnimationSpec AnimationSpec for position animation. The Position animation is used for animating changes to the scroll size and position. To disable this animation androidx.compose.animation.core.snap AnimationSpec should be passed instead.

Last updated: