Class

FlingCalculator.FlingInfo

Info about a fling started with initialVelocity.

Source set: Common
data class FlingInfo(val initialVelocity: Float, val distance: Float, val duration: Long)

Info about a fling started with initialVelocity. The units of initialVelocity determine the distance units of distance. duration is in nanoseconds.

Functions

position

Source set: Common
fun position(time: Long): Float

velocity

Source set: Common
fun velocity(time: Long): Float

positionFromNanos

Source set: Common
fun positionFromNanos(timeNanos: Long): Float

velocityFromNanos

Source set: Common
fun velocityFromNanos(timeNanos: Long): Float
Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: