FadeProvider

public final class FadeProvider implements VisibilityAnimatorProvider


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

Summary

Public fields

float

Public constructors

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

Get the fraction at which the appearing fade animation will end between 0 and 1.

void
setIncomingEndThreshold(float incomingEndThreshold)

Set the fraction by which an appearing fade animation should end between 0 and 1.

Public fields

incomingEndThreshold

public float incomingEndThreshold

Public constructors

FadeProvider

public FadeProvider()

Public methods

createAppear

public Animator createAppear(ViewGroup sceneRoot, View view)

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

Parameters
ViewGroup sceneRoot

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

View view

The view that is appearing

createDisappear

public Animator createDisappear(ViewGroup sceneRoot, View view)

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

Parameters
ViewGroup sceneRoot

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

View view

The view that is disappearing

getIncomingEndThreshold

public float getIncomingEndThreshold()

Get the fraction at which the appearing fade animation will end between 0 and 1.

setIncomingEndThreshold

public void setIncomingEndThreshold(float incomingEndThreshold)

Set the fraction by which an appearing fade animation should end between 0 and 1.

This can be used to stagger animations when this class' resulting animator is used inside an AnimatorSet. If the containing AnimatorSet has a total duration of 100 milliseconds and incomingEndThreshold is set to .75f, this class' animator will run and complete (the view will be completely faded in) after the AnimatorSet has run for 75 milliseconds.