Package-level declarations
Types
Link copied to clipboard
Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.CLASS, AnnotationTarget.TYPEALIAS, AnnotationTarget.TYPE] )
Link copied to clipboard
Identifies one complete animation declared in a selectable item animation.
Link copied to clipboard
interface AnimationSelectorStrategy
Chooses and retains the animation used by a selectable item animation.
Link copied to clipboard
Implements AnimationBuilder so all standard animation extensions (animateFloat, animateOffset, animateColor, etc.) can be called directly in the class body, automatically registering into this animation.
Link copied to clipboard
@RequiresOptIn(message = "`animateTo` bypasses the registered animations system. You are responsible for animating all registered values manually, otherwise they will remain frozen.", level = RequiresOptIn.Level.WARNING)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Selects the requested animation, or the declared default when no animation was requested.
Link copied to clipboard
Functions
Link copied to clipboard
fun <Context, T, V : AnimationVector> AnimationBuilder<Context>.animate(converter: TwoWayConverter<T, V>, zeroVelocity: T, spec: Context.() -> AnimationSpec<T> = { spring() }, stopOnTargetReached: Context.() -> Boolean? = null, initialValue: () -> T = { zeroVelocity }, value: Context.() -> T): TargetableMutableAnimatedValue<T, Context>
Link copied to clipboard
fun <Context> AnimationBuilder<Context>.animateColor(spec: Context.() -> AnimationSpec<Color> = { spring() }, colorSpace: ColorSpace = ColorSpaces.Srgb, stopOnTargetReached: Context.() -> Boolean? = null, value: Context.() -> Color = { Color.Transparent }): TargetableMutableAnimatedValue<Color, Context>
Link copied to clipboard
fun <Context> AnimationBuilder<Context>.animateDp(spec: Context.() -> AnimationSpec<Dp> = { spring() }, stopOnTargetReached: Context.() -> Boolean? = null, value: Context.() -> Dp = { 0.dp }): TargetableMutableAnimatedValue<Dp, Context>
Link copied to clipboard
fun <Context> AnimationBuilder<Context>.animateDpOffset(spec: Context.() -> AnimationSpec<DpOffset> = { spring() }, stopOnTargetReached: Context.() -> Boolean? = null, value: Context.() -> DpOffset = { DpOffset.Zero }): TargetableMutableAnimatedValue<DpOffset, Context>
Link copied to clipboard
fun <Context> AnimationBuilder<Context>.animateDpSize(spec: Context.() -> AnimationSpec<DpSize> = { spring() }, stopOnTargetReached: Context.() -> Boolean? = null, value: Context.() -> DpSize = { DpSize.Zero }): TargetableMutableAnimatedValue<DpSize, Context>
Link copied to clipboard
fun <Context> AnimationBuilder<Context>.animateFloat(spec: Context.() -> AnimationSpec<Float> = { spring() }, stopOnTargetReached: Context.() -> Boolean? = null, value: Context.() -> Float = { 0f }): TargetableMutableAnimatedValue<Float, Context>
Link copied to clipboard
fun <Context> AnimationBuilder<Context>.animateInt(spec: Context.() -> AnimationSpec<Int> = { spring() }, stopOnTargetReached: Context.() -> Boolean? = null, value: Context.() -> Int = { 0 }): TargetableMutableAnimatedValue<Int, Context>
Link copied to clipboard
fun <Context> AnimationBuilder<Context>.animateIntOffset(spec: Context.() -> AnimationSpec<IntOffset> = { spring() }, stopOnTargetReached: Context.() -> Boolean? = null, value: Context.() -> IntOffset = { IntOffset.Zero }): TargetableMutableAnimatedValue<IntOffset, Context>
Link copied to clipboard
fun <Context> AnimationBuilder<Context>.animateIntSize(spec: Context.() -> AnimationSpec<IntSize> = { spring() }, stopOnTargetReached: Context.() -> Boolean? = null, value: Context.() -> IntSize = { IntSize.Zero }): TargetableMutableAnimatedValue<IntSize, Context>
Link copied to clipboard
fun <Context> AnimationBuilder<Context>.animateOffset(spec: Context.() -> AnimationSpec<Offset> = { spring() }, stopOnTargetReached: Context.() -> Boolean? = null, value: Context.() -> Offset = { Offset.Zero }): TargetableMutableAnimatedValue<Offset, Context>
Link copied to clipboard
fun <Context> AnimationBuilder<Context>.animateSize(spec: Context.() -> AnimationSpec<Size> = { spring() }, stopOnTargetReached: Context.() -> Boolean? = null, value: Context.() -> Size = { Size.Zero }): TargetableMutableAnimatedValue<Size, Context>
Link copied to clipboard
fun <Context> buildSelectableItemAnimation(selectorStrategyFactory: () -> AnimationSelectorStrategy = { LastSelectedAnimationSelectorStrategy() }, block: SelectableItemAnimationBuilder<Context>.() -> Unit): ItemAnimation<Context>
Builds alternative complete item animations selected by input capability.
Link copied to clipboard