SnapperLayoutInfo
Contains the necessary information about the scrolling layout for SnapperFlingBehavior to determine how to fling.
Constructors
Functions
Link copied to clipboard
Returns true if the layout has some scroll range remaining to scroll towards the end.
Link copied to clipboard
Returns true if the layout has some scroll range remaining to scroll towards the start.
Link copied to clipboard
abstract fun determineTargetIndex( velocity: Float, decayAnimationSpec: DecayAnimationSpec<Float>, maximumFlingDistance: Float): Int
Content copied to clipboard
Calculate the desired target which should be scrolled to for the given velocity.
Link copied to clipboard
Calculate the distance in pixels needed to scroll to the given index. The value returned signifies which direction to scroll in: