MaterialSharedAxis

class MaterialSharedAxis : MaterialVisibility<P>

A androidx.transition.Visibility transition that provides shared motion along an axis.

When configured along the X axis, this transition slides and fades in the target when appearing and slides and fades out the target when disappearing.

When configured along the Y axis, this transition slides and fades in the target when appearing and slides and fades out the target when disappearing.

When configured along the Z axis, this transition scales and fades in when the target is appearing and scales and fades out when the target is disappearing.

The direction of the slide or scale is determined by the constructors's forward property. When true, the target will slide to the left on the X axis, up on the Y axis and out in on the Z axis. When false, the target will slide to the right on the X axis, down on the Y axis and in on the Z axis. Note that this is independent of whether or not the target is appearing or disappearing.

MaterialSharedAxis supports theme-based easing and duration. The transition will load theme values from the SceneRoot's context before it runs, and only use them if the corresponding properties weren't already set on the transition instance.

Constructors

Link copied to clipboard
constructor(axis: Int, forward: Boolean)

Types

Link copied to clipboard
annotation class Axis

Properties

Link copied to clipboard
val axis: Int
Link copied to clipboard
val X: Int = 0
Indicates that the x-axis should be shared for the transition, meaning a horizontal slide and fade should be used.
Link copied to clipboard
val Y: Int = 1
Indicates that the y-axis should be shared for the transition, meaning a vertical slide and fade should be used.
Link copied to clipboard
val Z: Int = 2
Indicates that the z-axis should be shared for the transition, meaning a scale and fade should be used.

Functions

Link copied to clipboard
open fun isForward(): Boolean