MaterialElevationScale

public final class MaterialElevationScale


A androidx.transition.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 .

Summary

Public constructors

MaterialElevationScale(boolean growing)

Public methods

void
addAdditionalAnimatorProvider(
    VisibilityAnimatorProvider additionalAnimatorProvider
)

Adds an additional VisibilityAnimatorProvider, which provides animators be played together with the primary and secondary VisibilityAnimatorProviders.

void

Clears all additional VisibilityAnimatorProviders that were previously added.

P

Returns the primary VisibilityAnimatorProvider for this transition, which can be modified but not swapped out completely.

VisibilityAnimatorProvider

Returns the secondary VisibilityAnimatorProvider for this transition or null, which can be modified or swapped out completely for a different VisibilityAnimatorProvider.

boolean
boolean
Animator
onAppear(
    ViewGroup sceneRoot,
    View view,
    TransitionValues startValues,
    TransitionValues endValues
)
Animator
onDisappear(
    ViewGroup sceneRoot,
    View view,
    TransitionValues startValues,
    TransitionValues endValues
)
boolean

Removes an additional VisibilityAnimatorProvider that was previously added.

void
setSecondaryAnimatorProvider(
    VisibilityAnimatorProvider secondaryAnimatorProvider
)

Sets the secondary VisibilityAnimatorProvider, which provides animators to be played together with the primary VisibilityAnimatorProvider.

Public fields

primaryAnimatorProvider

public final P primaryAnimatorProvider

secondaryAnimatorProvider

public VisibilityAnimatorProvider secondaryAnimatorProvider

Public constructors

MaterialElevationScale

public MaterialElevationScale(boolean growing)

Public methods

addAdditionalAnimatorProvider

public void addAdditionalAnimatorProvider(
    VisibilityAnimatorProvider additionalAnimatorProvider
)

Adds an additional VisibilityAnimatorProvider, which provides animators be played together with the primary and secondary VisibilityAnimatorProviders.

clearAdditionalAnimatorProvider

public void clearAdditionalAnimatorProvider()

Clears all additional VisibilityAnimatorProviders that were previously added.

getPrimaryAnimatorProvider

public P getPrimaryAnimatorProvider()

Returns the primary VisibilityAnimatorProvider for this transition, which can be modified but not swapped out completely.

getSecondaryAnimatorProvider

public VisibilityAnimatorProvider getSecondaryAnimatorProvider()

Returns the secondary VisibilityAnimatorProvider for this transition or null, which can be modified or swapped out completely for a different VisibilityAnimatorProvider.

isGrowing

public boolean isGrowing()

isSeekingSupported

public boolean isSeekingSupported()

onAppear

public Animator onAppear(
    ViewGroup sceneRoot,
    View view,
    TransitionValues startValues,
    TransitionValues endValues
)

onDisappear

public Animator onDisappear(
    ViewGroup sceneRoot,
    View view,
    TransitionValues startValues,
    TransitionValues endValues
)

removeAdditionalAnimatorProvider

public boolean removeAdditionalAnimatorProvider(
    VisibilityAnimatorProvider additionalAnimatorProvider
)

Removes an additional VisibilityAnimatorProvider that was previously added.

setSecondaryAnimatorProvider

public void setSecondaryAnimatorProvider(
    VisibilityAnimatorProvider secondaryAnimatorProvider
)

Sets the secondary VisibilityAnimatorProvider, which provides animators to be played together with the primary VisibilityAnimatorProvider.