FadeThroughProvider

public final class FadeThroughProvider
extends Object implements VisibilityAnimatorProvider

java.lang.Object
   ↳ com.google.android.material.transition.FadeThroughProvider


A class that configures and is able to provide an Animator that fades out or in a view.

FadeThroughProvider differs from FadeProvider in that it fades out and in views sequentially.

Summary

Public constructors

FadeThroughProvider()

Public methods

Animator createAppear(ViewGroup sceneRoot, View view)

Should return an Animator that animates in the appearing target view.

Animator createDisappear(ViewGroup sceneRoot, View view)

Should return an Animator that animates out the disappearing target view.

float getProgressThreshold()

Get the point at which a disappearing target finishes fading out and an appearing target begins to fade in.

void setProgressThreshold(float progressThreshold)

Set the point, between 0 and 1, at which a disappearing target finishes fading out and an appearing target begins to fade in.

Inherited methods

Object clone()
boolean equals(Object arg0)
void finalize()
final Class<?> getClass()
int hashCode()
final void notify()
final void notifyAll()
String toString()
final void wait(long arg0, int arg1)
final void wait(long arg0)
final void wait()
abstract Animator createAppear(ViewGroup sceneRoot, View view)

Should return an Animator that animates in the appearing target view.

abstract Animator createDisappear(ViewGroup sceneRoot, View view)

Should return an Animator that animates out the disappearing target view.

Public constructors

FadeThroughProvider

public FadeThroughProvider ()

Public methods

createAppear

public Animator createAppear (ViewGroup sceneRoot, 
                View view)

Should return an Animator that animates in the appearing target view.

Parameters
sceneRoot ViewGroup: The root of the transition hierarchy, which can be useful for checking configurations such as RTL

view View: The view that is appearing

Returns
Animator

createDisappear

public Animator createDisappear (ViewGroup sceneRoot, 
                View view)

Should return an Animator that animates out the disappearing target view.

Parameters
sceneRoot ViewGroup: The root of the transition hierarchy, which can be useful for checking configurations such as RTL

view View: The view that is disappearing

Returns
Animator

getProgressThreshold

public float getProgressThreshold ()

Get the point at which a disappearing target finishes fading out and an appearing target begins to fade in.

Returns
float

setProgressThreshold

public void setProgressThreshold (float progressThreshold)

Set the point, between 0 and 1, at which a disappearing target finishes fading out and an appearing target begins to fade in.

Parameters
progressThreshold float: A float between 0 and 1.