Interface

MotionScheme

A motion scheme provides all the [FiniteAnimationSpec]s for a [MaterialTheme].

Common
interface MotionScheme

A motion scheme provides all the FiniteAnimationSpecs for a MaterialTheme.

Motion schemes are designed to create a harmonious motion for components in the app.

There are two built-in schemes, a standard and an expressive, that can be used as-is or customized.

You can customize the motion scheme for all components in the MaterialTheme.

Functions

defaultSpatialSpec

fun <T> defaultSpatialSpec(): FiniteAnimationSpec<T>

A default spatial motion FiniteAnimationSpec.

This motion spec is designed to be applied to animations that may change the shape or bounds of the component. For color or alpha animations use the effects equivalent which ensures a "non-spatial" motion.

T is the generic data type that will be animated by the system, as long as the appropriate TwoWayConverter for converting the data to and from an AnimationVector is supplied.


fastSpatialSpec

fun <T> fastSpatialSpec(): FiniteAnimationSpec<T>

A fast spatial motion FiniteAnimationSpec.

This motion spec is designed to be applied to animations that may change the shape or bounds of the component. For color or alpha animations use the effects equivalent which ensures a "non-spatial" motion.

T is the generic data type that will be animated by the system, as long as the appropriate TwoWayConverter for converting the data to and from an AnimationVector is supplied.


slowSpatialSpec

fun <T> slowSpatialSpec(): FiniteAnimationSpec<T>

A slow spatial motion FiniteAnimationSpec.

This motion spec is designed to be applied to animations that may change the shape or bounds of the component. For color or alpha animations use the effects equivalent which ensures a "non-spatial" motion.

T is the generic data type that will be animated by the system, as long as the appropriate TwoWayConverter for converting the data to and from an AnimationVector is supplied.


defaultEffectsSpec

fun <T> defaultEffectsSpec(): FiniteAnimationSpec<T>

A default effects motion FiniteAnimationSpec.

This motion spec is designed to be applied to animations that do not change the shape or bounds of the component. For example, color animation.

T is the generic data type that will be animated by the system, as long as the appropriate TwoWayConverter for converting the data to and from an AnimationVector is supplied.


fastEffectsSpec

fun <T> fastEffectsSpec(): FiniteAnimationSpec<T>

A fast effects motion FiniteAnimationSpec.

This motion spec is designed to be applied to animations that do not change the shape or bounds of the component. For example, color animation.

T is the generic data type that will be animated by the system, as long as the appropriate TwoWayConverter for converting the data to and from an AnimationVector is supplied.


slowEffectsSpec

fun <T> slowEffectsSpec(): FiniteAnimationSpec<T>

A slow effects motion FiniteAnimationSpec.

This motion spec is designed to be applied to animations that do not change the shape or bounds of the component. For example, color animation.

T is the generic data type that will be animated by the system, as long as the appropriate TwoWayConverter for converting the data to and from an AnimationVector is supplied.