MaterialSharedAxis
public
final
class
MaterialSharedAxis
extends Visibility
java.lang.Object | |||
↳ | android.transition.Transition | ||
↳ | android.transition.Visibility | ||
↳ | com.google.android.material.transition.platform.MaterialSharedAxis |
A 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.
Summary
Constants | |
---|---|
int |
X
Indicates that the x-axis should be shared for the transition, meaning a horizontal slide and fade should be used. |
int |
Y
Indicates that the y-axis should be shared for the transition, meaning a vertical slide and fade should be used. |
int |
Z
Indicates that the z-axis should be shared for the transition, meaning a scale and fade should be used. |
Inherited constants |
---|
![]()
android.transition.Visibility
|
![]()
android.transition.Transition
|
Public constructors | |
---|---|
MaterialSharedAxis(int axis, boolean forward)
|
Public methods | |
---|---|
int
|
getAxis()
|
P extends VisibilityAnimatorProvider
|
getPrimaryAnimatorProvider()
|
VisibilityAnimatorProvider
|
getSecondaryAnimatorProvider()
|
boolean
|
isForward()
|
Animator
|
onAppear(ViewGroup sceneRoot, View view, TransitionValues startValues, TransitionValues endValues)
|
Animator
|
onDisappear(ViewGroup sceneRoot, View view, TransitionValues startValues, TransitionValues endValues)
|
void
|
setSecondaryAnimatorProvider(VisibilityAnimatorProvider secondaryAnimatorProvider)
|
Inherited methods | |
---|---|
![]()
android.transition.Visibility
| |
![]()
android.transition.Transition
| |
![]()
java.lang.Object
|
Constants
X
int X
Indicates that the x-axis should be shared for the transition, meaning a horizontal slide and fade should be used.
In the forward direction, targets of this transition will slide left.
Constant Value: 0 (0x00000000)
Y
int Y
Indicates that the y-axis should be shared for the transition, meaning a vertical slide and fade should be used.
In the forward direction, targets of this transition will slide up.
Constant Value: 1 (0x00000001)
Z
int Z
Indicates that the z-axis should be shared for the transition, meaning a scale and fade should be used.
In the forward direction, targets of this transition will scale out.
Constant Value: 2 (0x00000002)
Public constructors
MaterialSharedAxis
MaterialSharedAxis (int axis, boolean forward)
Parameters | |
---|---|
axis |
int |
forward |
boolean |
Public methods
getAxis
int getAxis ()
Returns | |
---|---|
int |
getPrimaryAnimatorProvider
P extends VisibilityAnimatorProvider getPrimaryAnimatorProvider ()
Returns | |
---|---|
P extends VisibilityAnimatorProvider |
getSecondaryAnimatorProvider
VisibilityAnimatorProvider getSecondaryAnimatorProvider ()
Returns | |
---|---|
VisibilityAnimatorProvider |
isForward
boolean isForward ()
Returns | |
---|---|
boolean |
onAppear
Animator onAppear (ViewGroup sceneRoot, View view, TransitionValues startValues, TransitionValues endValues)
Parameters | |
---|---|
sceneRoot |
ViewGroup |
view |
View |
startValues |
TransitionValues |
endValues |
TransitionValues |
Returns | |
---|---|
Animator |
onDisappear
Animator onDisappear (ViewGroup sceneRoot, View view, TransitionValues startValues, TransitionValues endValues)
Parameters | |
---|---|
sceneRoot |
ViewGroup |
view |
View |
startValues |
TransitionValues |
endValues |
TransitionValues |
Returns | |
---|---|
Animator |
setSecondaryAnimatorProvider
void setSecondaryAnimatorProvider (VisibilityAnimatorProvider secondaryAnimatorProvider)
Parameters | |
---|---|
secondaryAnimatorProvider |
VisibilityAnimatorProvider |
Interfaces
Classes
- FadeProvider
- FadeThroughProvider
- Hold
- MaterialArcMotion
- MaterialContainerTransform
- MaterialContainerTransform.ProgressThresholds
- MaterialContainerTransformSharedElementCallback
- MaterialContainerTransformSharedElementCallback.ShapeableViewShapeProvider
- MaterialElevationScale
- MaterialFade
- MaterialFadeThrough
- MaterialSharedAxis
- ScaleProvider
- SlideDistanceProvider