Animatable

open class Animatable(source)

Constructors

Link copied to clipboard
constructor()
constructor(createAtTime: Long)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
fun <T : LinearType<T>> animate(variable: KMutableProperty0<T>, target: T, durationMillis: Long, easing: Easing = Easing.None, predelayInMs: Long = 0): PropertyAnimationKey<T>
fun animate(variable: KMutableProperty0<Double>, target: Double, durationMillis: Long, easing: Easing = Easing.None, predelayInMs: Long = 0): PropertyAnimationKey<Double>
Link copied to clipboard
@JvmName(name = "animatePropLinearType")
fun <T : LinearType<T>> KMutableProperty0<T>.animate(targetValue: T, durationInMs: Long, easing: Easing = Easing.None, predelayInMs: Long = 0): PropertyAnimationKey<T>

animate LinearType property

@JvmName(name = "animateProp")
fun KMutableProperty0<Double>.animate(targetValue: Double, durationInMs: Long, easing: Easing = Easing.None, predelayInMs: Long = 0): PropertyAnimationKey<Double>

animate Double property

Link copied to clipboard

Returns the number of playing plus queued animations

Link copied to clipboard
@JvmName(name = "animateUnitProperty")
fun KMutableProperty0<Unit>.animationGroup(builder: Animatable.() -> Unit): PropertyAnimationKey<Unit>

create an animation group

Link copied to clipboard
fun cancel()

Cancels all animations.

Link copied to clipboard
@JvmName(name = "cancelLinearTypeProperty")
fun <T : LinearType<T>> KMutableProperty0<T>.cancel()

cancel all animations on LinearType property

@JvmName(name = "cancelDoubleProperty")
fun KMutableProperty0<Double>.cancel()

cancel all animations on Double property

@JvmName(name = "cancelUnitProperty")
fun KMutableProperty0<Unit>.cancel()

cancel all animation groups on Unit property

Link copied to clipboard
@JvmName(name = "completeLinearTypeProperty")
fun <T : LinearType<T>> KMutableProperty0<T>.complete()
@JvmName(name = "completeDoubleProperty")
fun KMutableProperty0<Double>.complete()
@JvmName(name = "completeUnitProperty")
fun KMutableProperty0<Unit>.complete()
Link copied to clipboard
fun delay(delayInMs: Long, delayInNs: Long = 0)

Wait for a given time before cueing the next animation.

Link copied to clipboard

Queries if animations are cued.

Link copied to clipboard
fun popTime()
Link copied to clipboard
fun pushTime()
Link copied to clipboard
fun updateAnimation(timeInNs: Long = clock.timeNanos)

Updates the animation state with a user supplied time

Link copied to clipboard
fun waitUntil(timeInMs: Long, timeInNs: Long = 0)

Wait until the given timeMillis

Properties

Link copied to clipboard

the time at which created animations will start

Link copied to clipboard
@get:JvmName(name = "durationInMsLinearTypeProperty")
val <T : LinearType<T>> KMutableProperty0<T>.durationInMs: Long

remaining duration of queued and active animations for LinearType property

@get:JvmName(name = "durationInMsDouble")
val KMutableProperty0<Double>.durationInMs: Long

remaining duration of queued and active animations for Double property

@get:JvmName(name = "durationInMsUnit")
val KMutableProperty0<Unit>.durationInMs: Long

remaining duration of queued and activate animation groups for Unit property

Link copied to clipboard
@get:JvmName(name = "hasAnimationsLinearTypeProperty")
val <T : LinearType<T>> KMutableProperty0<T>.hasAnimations: Boolean

check if LinearType property has queued or active animation groups

@get:JvmName(name = "hasAnimationsDoubleProperty")
val KMutableProperty0<Double>.hasAnimations: Boolean

check if Double property has queued or active animation groups

@get:JvmName(name = "hasAnimationsUnitProperty")
val KMutableProperty0<Unit>.hasAnimations: Boolean

check if Unit property has queued or active animation groups

Link copied to clipboard
@get:JvmName(name = "lastLinearTypeProperty")
val <T : LinearType<T>> KMutableProperty0<T>.last: PropertyAnimationKey<T>?

the last queued or active animation for LinearType property, or null if no animations are available

@get:JvmName(name = "lastDoubleProperty")
val KMutableProperty0<Double>.last: PropertyAnimationKey<Double>?

the last queued or active animation for Double property, or null if no animations are available

@get:JvmName(name = "lastUnitProperty")
val KMutableProperty0<Unit>.last: PropertyAnimationKey<Unit>?

the last queued or active animation group for Unit property, or null if no animations are available