Package-level declarations

Types

Link copied to clipboard
object Animated
Link copied to clipboard

Interface representing single animation (like Animated.timing or Animated.spring) or a collection of them

Link copied to clipboard

Listener that allows to listen for animation finish or cancel events.

Link copied to clipboard
object Easing
Link copied to clipboard
class LoopAnimation(repeatCount: Int, animation: AnimatedAnimation) : AnimatedAnimation

Creates animation that will run in a loop repeatCount times when LoopAnimation.start is triggered

Link copied to clipboard

Creates collection of animators that will run in parallel when ParallelAnimation.start is triggered

Link copied to clipboard

Creates collection of animators that will run one after another in sequence when SequenceAnimation.start is triggered

Link copied to clipboard
class SpringConfig(var stiffness: Float = SpringForce.STIFFNESS_LOW, var dampingRatio: Float = SpringForce.DAMPING_RATIO_MEDIUM_BOUNCY)

The stiffer the spring is, the harder it is to stretch it and the faster it undergoes dampening. Spring damping ratio describes behavior after the disturbance, over-damp values (more than 1) make the spring quickly return to the rest position. Under-damp values (less than 1) cause overshooting. Damping equal to 0 will cause the spring to oscillate forever. (The lower the damping ratio, the higher the bounciness)

Functions

Link copied to clipboard
inline fun Style.alpha(alpha: DynamicValue<Float>): Style
Link copied to clipboard
inline fun Style.background(background: DynamicValue<out Drawable>): Style
Link copied to clipboard
inline fun Style.backgroundColor(background: DynamicValue<Int>): Style
Link copied to clipboard
inline fun Style.elevation(elevation: DynamicValue<Float>): Style
Link copied to clipboard
inline fun Style.foregroundColor(foreground: DynamicValue<Int>): Style
Link copied to clipboard
inline fun Style.rotation(rotation: DynamicValue<Float>): Style
Link copied to clipboard
inline fun Style.scaleX(scaleX: DynamicValue<Float>): Style
Link copied to clipboard
inline fun Style.scaleY(scaleY: DynamicValue<Float>): Style
Link copied to clipboard
inline fun Style.translationX(translationX: DynamicValue<Float>): Style
Link copied to clipboard
inline fun Style.translationY(translationY: DynamicValue<Float>): Style
Link copied to clipboard
fun <T> ComponentScope.useBinding(initialValue: T): DynamicValue<T>

Creates a DynamicValue with a static initial value. This DynamicValue can be passed to the variants of Style properties that take DynamicValue, like Style.backgroundColor or Style.translationY. You can then imperatively set a new value on the main thread to update that property without a state update, or use the collection of Animated APIs to drive animations on this DynamicValue, which will in turn animate the property.

fun <T, S> ComponentScope.useBinding(binding: DynamicValue<T>, transform: (T) -> S): DynamicValue<S>

Creates a DynamicValue deriving from an existing binding param, with modifications applied by transform function.