<div class='sourceset sourceset-android'>Android</div>

```kotlin
public object OneHandedGestureDefaults
```

Contains the default values used by one-handed gestures

## Functions

<h2 id="scrolldown-scrollstate">scrollDown</h2>

```kotlin
public suspend fun scrollDown(scrollState: TransformingLazyColumnState)
```

A scroll implementation tailored for use with [TransformingLazyColumnState](/jetpack-compose/androidx.wear.compose/compose-foundation/classes/TransformingLazyColumnState).

This logic handles one-handed gesture by first attempting to scroll to the next item in the
list (or scrolling through the current item if it exceeds the viewport size). If the list
cannot scroll further forward, it scrolls back to the start.

Sample demonstrating gesture handling with [TransformingLazyColumnState](/jetpack-compose/androidx.wear.compose/compose-foundation/classes/TransformingLazyColumnState):

#### Parameters

| | |
| --- | --- |
| scrollState | The scroll state associated with a transforming lazy column. |

<hr class="docs-overload-divider">

<h2 id="scrolltonextpage-pagerstate">scrollToNextPage</h2>

```kotlin
public suspend fun scrollToNextPage(pagerState: PagerState)
```

Automatically animates the [pagerState](/jetpack-compose/androidx.wear.compose/compose-foundation/classes/PagerState) to the next available page.

This function triggers a smooth scroll transition to the next page index. If the current page
is the last page in the pager, the animation will wrap around to the first page (index 0).

Samples demonstrating gesture handling with horizontal and vertical pagers:

#### Parameters

| | |
| --- | --- |
| pagerState | The state of the pager to be animated. |

<hr class="docs-overload-divider">

<h2 id="gestureindicator-gestureindicatorvisible-ongestureindicatorfinished-modifier-content">GestureIndicator</h2>

```kotlin
@Composable
public fun GestureIndicator(
    gestureIndicatorVisible: Boolean,
    onGestureIndicatorFinished: () -> Unit,
    modifier: Modifier = Modifier,
    content: @Composable () -> Unit,
)
```

A wrapper that replaces the `content` to indicate to the user that a gesture action is
available.

This component handles the visual transition between the standard `content` and a gesture
indicator. When `gestureIndicatorVisible` is enabled, the `content` is swapped out for the
indicator. Once the indicator display sequence is complete, `onGestureIndicatorFinished` is
called, allowing the UI to return to its original state.

Sample demonstrating a gesture indicator applied to a
[androidx.wear.compose.material3.Button](/jetpack-compose/androidx.wear.compose/compose-material3/components/Button):

#### Parameters

| | |
| --- | --- |
| gestureIndicatorVisible | A boolean flag that triggers the transition from `content` to the indicator. While true, the `content` is hidden and the indicator is played. |
| 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`. |
| modifier | The [Modifier](/jetpack-compose/androidx.compose.ui/ui/interfaces/Modifier) to be applied to the indicator animation container. |
| content | The original button content (e.g., Text or Icon) to be displayed when no indicator is active. |

<hr class="docs-overload-divider">

<h2 id="scrollgestureindicator-gestureindicatorvisible-ongestureindicatorfinished-state-modifier-colors-reversedirection-positionanimationspec">ScrollGestureIndicator</h2>

```kotlin
@Composable
public fun ScrollGestureIndicator(
    gestureIndicatorVisible: Boolean,
    onGestureIndicatorFinished: () -> Unit,
    state: TransformingLazyColumnState,
    modifier: Modifier = Modifier,
    colors: ScrollIndicatorColors = ScrollIndicatorDefaults.colors(),
    reverseDirection: Boolean = false,
    positionAnimationSpec: AnimationSpec<Float> = ScrollIndicatorDefaults.PositionAnimationSpec,
)
```

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

Under normal conditions, this component behaves like a standard scroll indicator, reflecting
the current scroll position of a
[androidx.wear.compose.foundation.lazy.TransformingLazyColumn](/jetpack-compose/androidx.wear.compose/compose-foundation/composable-functions/TransformingLazyColumn). When
`gestureIndicatorVisible` is set to true, the indicator temporarily replaces its standard
visual state with a gesture animation sequence.

Sample demonstrating a gesture indicator applied to a
[androidx.wear.compose.foundation.lazy.TransformingLazyColumn](/jetpack-compose/androidx.wear.compose/compose-foundation/composable-functions/TransformingLazyColumn):

#### 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](/jetpack-compose/androidx.wear.compose/compose-foundation/composable-functions/TransformingLazyColumn) this indicator is coupled with. |
| modifier | The [Modifier](/jetpack-compose/androidx.compose.ui/ui/interfaces/Modifier) to be applied to the scroll indicator. |
| colors | [ScrollIndicatorColors](/jetpack-compose/androidx.wear.compose/compose-material3/classes/ScrollIndicatorColors) that will be used to resolve the indicator and track colors for this [androidx.wear.compose.material3.ScrollIndicator](/jetpack-compose/androidx.wear.compose/compose-material3/components/ScrollIndicator). |
| reverseDirection | Reverses direction of ScrollIndicator if true. |
| positionAnimationSpec | [AnimationSpec](/jetpack-compose/androidx.compose.animation/animation-core/interfaces/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](/jetpack-compose/androidx.compose.animation/animation-core/functions/snap) AnimationSpec should be passed instead. |

<hr class="docs-overload-divider">

<h2 id="horizontalpagegestureindicator-gestureindicatorvisible-ongestureindicatorfinished-pagerstate-modifier-selectedcolor-unselectedcolor-backgroundcolor">HorizontalPageGestureIndicator</h2>

```kotlin
@Composable
public fun HorizontalPageGestureIndicator(
    gestureIndicatorVisible: Boolean,
    onGestureIndicatorFinished: () -> Unit,
    pagerState: PagerState,
    modifier: Modifier = Modifier,
    selectedColor: Color = PageIndicatorDefaults.selectedColor,
    unselectedColor: Color = PageIndicatorDefaults.unselectedColor,
    backgroundColor: Color = PageIndicatorDefaults.backgroundColor,
)
```

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

In its idle state, this component functions as a standard page indicator, using dots or bars
to represent the [pagerState](/jetpack-compose/androidx.wear.compose/compose-foundation/classes/PagerState). When `gestureIndicatorVisible` is set to true, the indicator
temporarily replaces its standard visual state with a gesture animation sequence.

Sample demonstrating a gesture indicator applied to a
[androidx.wear.compose.foundation.pager.HorizontalPager](/jetpack-compose/androidx.wear.compose/compose-foundation/composable-functions/HorizontalPager):

#### 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.HorizontalPager](/jetpack-compose/androidx.wear.compose/compose-foundation/composable-functions/HorizontalPager) that this indicator represents. |
| modifier | Modifier to be applied to the [HorizontalPageIndicator](/jetpack-compose/androidx.wear.compose/compose-material3/components/HorizontalPageIndicator) |
| 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. |

<hr class="docs-overload-divider">

<h2 id="verticalpagegestureindicator-gestureindicatorvisible-ongestureindicatorfinished-pagerstate-modifier-selectedcolor-unselectedcolor-backgroundcolor">VerticalPageGestureIndicator</h2>

```kotlin
@Composable
public fun VerticalPageGestureIndicator(
    gestureIndicatorVisible: Boolean,
    onGestureIndicatorFinished: () -> Unit,
    pagerState: PagerState,
    modifier: Modifier = Modifier,
    selectedColor: Color = PageIndicatorDefaults.selectedColor,
    unselectedColor: Color = PageIndicatorDefaults.unselectedColor,
    backgroundColor: Color = PageIndicatorDefaults.backgroundColor,
)
```

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

In its idle state, this component functions as a standard page indicator, using dots or bars
to represent the [pagerState](/jetpack-compose/androidx.wear.compose/compose-foundation/classes/PagerState). When `gestureIndicatorVisible` is set to true, the indicator
temporarily replaces its standard visual state with a gesture animation sequence.

Sample demonstrating a gesture indicator applied to a
[androidx.wear.compose.foundation.pager.VerticalPager](/jetpack-compose/androidx.wear.compose/compose-foundation/composable-functions/VerticalPager):

#### 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](/jetpack-compose/androidx.wear.compose/compose-foundation/composable-functions/VerticalPager) that this indicator represents. |
| modifier | Modifier to be applied to the [VerticalPageIndicator](/jetpack-compose/androidx.wear.compose/compose-material3/components/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. |