Google 致力于为黑人社区推动种族平等。查看具体举措

MaterialElevationScale

public final class MaterialElevationScale
extends Visibility

java.lang.Object
   ↳ android.transition.Transition
     ↳ android.transition.Visibility
       ↳ com.google.android.material.transition.platform.MaterialElevationScale


A Visibility transition that scales the size of a surface up or down to emphasize elevation changes.

This can be useful as an exit transition and reenter transition in conjunction with the MaterialContainerTransform.

Summary

Inherited constants

From class android.transition.Visibility
From class android.transition.Transition

Public constructors

MaterialElevationScale(boolean growing)

Public methods

P extends VisibilityAnimatorProvider getPrimaryAnimatorProvider()
VisibilityAnimatorProvider getSecondaryAnimatorProvider()
boolean isGrowing()
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

From class android.transition.Visibility
From class android.transition.Transition
From class java.lang.Object

Public constructors

MaterialElevationScale

MaterialElevationScale (boolean growing)

Parameters
growing boolean

Public methods

getPrimaryAnimatorProvider

P extends VisibilityAnimatorProvider getPrimaryAnimatorProvider ()

Returns
P extends VisibilityAnimatorProvider

getSecondaryAnimatorProvider

VisibilityAnimatorProvider getSecondaryAnimatorProvider ()

Returns
VisibilityAnimatorProvider

isGrowing

boolean isGrowing ()

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