Function

calculateTargetValue

Calculates the target value of a decay animation based on the initialValue and initialVelocity, and the typeConverter that converts the given type T to AnimationVector.

calculateTargetValue

Source set: Common
public fun <T, V : AnimationVector> DecayAnimationSpec<T>.calculateTargetValue(
    typeConverter: TwoWayConverter<T, V>,
    initialValue: T,
    initialVelocity: T,
): T

Calculates the target value of a decay animation based on the initialValue and initialVelocity, and the typeConverter that converts the given type T to AnimationVector.

Return

target value where the animation will come to a natural stop

calculateTargetValue

Source set: Common
public fun DecayAnimationSpec<Float>.calculateTargetValue(
    initialValue: Float,
    initialVelocity: Float,
): Float

Calculates the target value of a Float decay animation based on the initialValue and initialVelocity.

Return

target value where the animation will come to a natural stop

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: