VectorizedSnapSpec
-
Cmn
class VectorizedSnapSpec<V : AnimationVector> : VectorizedDurationBasedAnimationSpec
VectorizedSnapSpec immediately snaps the animating value to the end value.
Summary
Public constructors |
|
|---|---|
<V : AnimationVector> VectorizedSnapSpec(delayMillis: Int) |
Cmn
|
Public functions |
||
|---|---|---|
open V |
getValueFromNanos(Calculates the value of the animation at given the playtime, with the provided start/end values, and start velocity. |
Cmn
|
open V |
getVelocityFromNanos(Calculates the velocity of the animation at given the playtime, with the provided start/end values, and start velocity. |
Cmn
|
Public properties |
||
|---|---|---|
open Int |
the amount of time (in milliseconds) that the animation should wait before it starts. |
Cmn
|
open Int |
duration is the amount of time while animation is not yet finished. |
Cmn
|
Inherited functions |
|||
|---|---|---|---|
|
|||
|
Inherited properties |
|||
|---|---|---|---|
|
Public constructors
VectorizedSnapSpec
<V : AnimationVector> VectorizedSnapSpec(delayMillis: Int = 0)
| Parameters | |
|---|---|
delayMillis: Int = 0 |
the amount of time (in milliseconds) that the animation should wait before it starts. Defaults to 0. |
Public functions
getValueFromNanos
open fun getValueFromNanos(
playTimeNanos: Long,
initialValue: V,
targetValue: V,
initialVelocity: V
): V
Calculates the value of the animation at given the playtime, with the provided start/end values, and start velocity.
| Parameters | |
|---|---|
playTimeNanos: Long |
time since the start of the animation |
initialValue: V |
start value of the animation |
targetValue: V |
end value of the animation |
initialVelocity: V |
start velocity of the animation |
getVelocityFromNanos
open fun getVelocityFromNanos(
playTimeNanos: Long,
initialValue: V,
targetValue: V,
initialVelocity: V
): V
Calculates the velocity of the animation at given the playtime, with the provided start/end values, and start velocity.
| Parameters | |
|---|---|
playTimeNanos: Long |
time since the start of the animation |
initialValue: V |
start value of the animation |
targetValue: V |
end value of the animation |
initialVelocity: V |
start velocity of the animation |
Public properties
delayMillis
open val delayMillis: Int
the amount of time (in milliseconds) that the animation should wait before it starts. Defaults to 0.
durationMillis
open val durationMillis: Int
duration is the amount of time while animation is not yet finished.