VectorizedDurationBasedAnimationSpec
interface VectorizedDurationBasedAnimationSpec<V : AnimationVector> : VectorizedFiniteAnimationSpec<V>
androidx.compose.animation.core.VectorizedDurationBasedAnimationSpec |
Base class for VectorizedAnimationSpecs that are based on a fixed durationMillis.
Summary
Public methods | |
---|---|
open Long |
getDurationMillis(start: V, end: V, startVelocity: V) Calculates the duration of an animation. |
Properties | |
---|---|
abstract Int |
delay defines the amount of time that animation can be delayed. |
abstract Int |
duration is the amount of time while animation is not yet finished. |
Public methods
getDurationMillis
open fun getDurationMillis(
start: V,
end: V,
startVelocity: V
): Long
Calculates the duration of an animation. For duration-based animations, this will return the pre-defined duration. For physics-based animations, the duration will be estimated based on the physics configuration (such as spring stiffness, damping ratio, visibility threshold) as well as the start, end values, and startVelocity.
Parameters | |
---|---|
start: V | start value of the animation |
end: V | end value of the animation |
startVelocity: V | start velocity of the animation |
Properties
delayMillis
abstract val delayMillis: Int
delay defines the amount of time that animation can be delayed.
durationMillis
abstract val durationMillis: Int
duration is the amount of time while animation is not yet finished.