rememberSnapFlingBehavior
Composable Function
Common
@Composable
fun rememberSnapFlingBehavior(
lazyListState: LazyListState,
snapPosition: SnapPosition = SnapPosition.Center,
): FlingBehavior
Create and remember a FlingBehavior for decayed snapping in Lazy Lists. This will snap the item
according to snapPosition
.
Parameters
lazyListState | The LazyListState from the LazyList where this FlingBehavior will be used. |
snapPosition | The desired positioning of the snapped item within the main layout. This position should be considered with regards to the start edge of the item and the placement within the viewport. |
Common
@Composable
fun rememberSnapFlingBehavior(
snapLayoutInfoProvider: SnapLayoutInfoProvider
): TargetedFlingBehavior
Creates and remember a FlingBehavior
that performs snapping.
Parameters
snapLayoutInfoProvider | The information about the layout that will do snapping |
Common
@Composable
fun rememberSnapFlingBehavior(
lazyGridState: LazyGridState,
snapPosition: SnapPosition = SnapPosition.Center,
): FlingBehavior
Create and remember a FlingBehavior for decayed snapping in Lazy Grids. This will snap the item
according to snapPosition
.
Parameters
lazyGridState | The LazyGridState from the LazyGrid where this FlingBehavior will be used. |
snapPosition | The desired positioning of the snapped item within the main layout. This position should be considered with regards to the start edge of the item and the placement within the viewport. |