androidx.compose.foundation.gestures
FlingBehavior
Interface · from org.jetbrains.compose.foundation:foundation:1.12.2
No hand-written docs yet.
Interface to specify fling behavior.
interface FlingBehavior
Kinds of FlingBehavior
Anywhere a FlingBehavior is expected, you can pass any of these.
TargetedFlingBehaviorfoundation
How to get one
Ready-made values and functions that return it
Or create one of the kinds listed above.
Used by
Parameters that take a FlingBehavior.
anchoredDraggable(flingBehavior)horizontalScroll(flingBehavior)LazyColumn(flingBehavior)LazyHorizontalGrid(flingBehavior)LazyHorizontalStaggeredGrid(flingBehavior)LazyRow(flingBehavior)LazyVerticalGrid(flingBehavior)LazyVerticalStaggeredGrid(flingBehavior)rememberPaneExpansionState(flingBehavior)scrollable(flingBehavior)scrollable2D(flingBehavior)scrollableArea(flingBehavior)verticalScroll(flingBehavior)
Functions
performFling
fun ScrollScope.performFling(initialVelocity: Float): Float
Perform settling via fling animation with given velocity and suspend until fling has finished.
Library docs
Interface to specify fling behavior.
When drag has ended with velocity in scrollable, performFling is invoked to perform fling
animation and update state via ScrollScope.scrollBy