KeyframesWithSplineSpecConfig

Keyframe configuration class for KeyframesWithSplineSpec.

Since keyframesWithSpline uses the values across all the given intervals to calculate the shape of the animation, KeyframesWithSplineSpecConfig does not allow setting a specific com.jakewharton.mosaic.animation.ArcMode between intervals (compared to KeyframesSpecConfig used for keyframes).

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
@get:IntRange(from = 0)
var delayMillis: Int

The amount of time that the animation should be delayed. The minimum is 0 and defaults to 0.

Link copied to clipboard
@get:IntRange(from = 0)
var durationMillis: Int

Duration of the animation in milliseconds. The minimum is 0 and defaults to AnimationConstants.DefaultDurationMillis

Functions

Link copied to clipboard
open infix fun T.at(@IntRange(from = 0) timeStamp: Int): KeyframesSpec.KeyframeEntity<T>

Adds a keyframe so that animation value will be this at time: timeStamp. For example:

Link copied to clipboard
open infix fun T.atFraction(@FloatRange(from = 0.0, to = 1.0) fraction: Float): KeyframesSpec.KeyframeEntity<T>

Adds a keyframe so that the animation value will be the value specified at a fraction of the total durationMillis set. It's recommended that you always set durationMillis before calling atFraction. For example:

Link copied to clipboard

Adds an com.jakewharton.mosaic.animation.Easing for the interval started with the just provided timestamp. For example: 0f at 50 using LinearEasing