public object OneHandedGestureDefaults
Properties
indicatorSize
public val indicatorSize: GestureIndicatorSize
The default size constraints for the gesture indicator icon.
indicatorTint
public val indicatorTint: Color
The tint color used for the gesture animation.
scrollIndicatorTint
public val scrollIndicatorTint: Color
The tint color used for the scroll gesture animation icons.
scrollIndicatorBackgroundColor
public val scrollIndicatorBackgroundColor: Color
The background color used behind the scroll gesture animations.
pageIndicatorTint
public val pageIndicatorTint: Color
The tint color used for the pager gesture animation icons.
pageIndicatorBackgroundColor
public val pageIndicatorBackgroundColor: Color
The background color used behind the pager gesture animations.
Functions
scrollDown
public suspend fun scrollDown(
scrollState: TransformingLazyColumnState,
wrapAround: Boolean = true,
)
A scroll implementation tailored for use with TransformingLazyColumnState.
This logic handles one-handed gesture by first attempting to scroll the list by half the viewport. If the list cannot scroll further forward, it scrolls back to the start.
Sample demonstrating gesture handling with TransformingLazyColumnState:
Parameters
| scrollState | The scroll state associated with a transforming lazy column. |
| wrapAround | Whether to automatically scroll back to the first item when reaching the end of the content. |
scrollDown
public suspend fun scrollDown(scrollState: ScalingLazyListState, wrapAround: Boolean = true)
A scroll implementation tailored for use with ScalingLazyListState.
This logic handles one-handed gesture by first attempting to scroll the list by half the viewport. If the list cannot scroll further forward, it scrolls back to the start.
Sample demonstrating gesture handling with ScalingLazyListState:
Parameters
| scrollState | The scroll state associated with a scaling lazy column. |
| wrapAround | Whether to automatically scroll back to the first item when reaching the end of the content. |
scrollDownToNextItem
public suspend fun scrollDownToNextItem(
scrollState: TransformingLazyColumnState,
wrapAround: Boolean = true,
)
A scroll implementation tailored for use with 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:
Parameters
| scrollState | The scroll state associated with a transforming lazy column. |
| wrapAround | Whether to automatically scroll back to the first item when reaching the end of the content. |
scrollDownToNextItem
public suspend fun scrollDownToNextItem(
scrollState: ScalingLazyListState,
wrapAround: Boolean = true,
)
A scroll implementation tailored for use with ScalingLazyListState.
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 ScalingLazyListState:
Parameters
| scrollState | The scroll state associated with a scaling lazy column. |
| wrapAround | Whether to automatically scroll back to the first item when reaching the end of the content. |
scrollToNextPage
public suspend fun scrollToNextPage(pagerState: PagerState, wrapAround: Boolean = true)
Automatically animates the 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. |
| wrapAround | Determines whether the pager should wrap around to the first page (index 0) after reaching the last page. |