public object OneHandedGestureDefaults
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)
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. |