public class DrawableCrossFadeTransition extends java.lang.Object implements Transition<android.graphics.drawable.Drawable>
Drawables that uses an
TransitionDrawableto transition from an existing drawable already visible on the target to a new drawable. If no existing drawable exists, this class can instead fall back to a default animation that doesn't rely on
|Constructor and Description|
|Modifier and Type||Method and Description|
Animates from the previous drawable to the current drawable in one of two ways.
public DrawableCrossFadeTransition(int duration, boolean isCrossFadeEnabled)
duration- The duration that the cross fade animation should run if there is something to cross fade from when a new
true, animates the previous resource's alpha to 0 while animating the new resource's alpha to 100. Otherwise, only animates the new resource's alpha to 100 while leaving the previous resource's alpha at 100. See
public boolean transition(android.graphics.drawable.Drawable current, Transition.ViewAdapter adapter)
current- The new resource that will be displayed in the view.
Transition.ViewAdapterwrapping a view that can at least return an