FadeProvider
public
final
class
FadeProvider
extends Object
implements
VisibilityAnimatorProvider
java.lang.Object
|
↳
|
com.google.android.material.transition.platform.FadeProvider
|
A class that configures and is able to provide an
Animator
that fades a view.
Summary
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
|
getIncomingEndThreshold
()
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.
|
Inherited methods
|
From class
java.lang.Object
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()
|
|
|
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
|
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
|
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
|
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.
Parameters
|
incomingEndThreshold
|
float
|