public final class MaterialFadeThrough

A androidx.transition.Visibility transition that, by default, provides a fade in and scale out when appearing and a fade out and scale out when disappearing.

MaterialFadeThrough 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.

Summary

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
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

Public constructors

Public methods

onAppear

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

onDisappear

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

Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.

Last updated 2025-10-28 UTC.