T- The type of the
Drawablethat will be animated.
public class DrawableCrossFadeViewAnimation<T extends Drawable> extends Object implements GlideAnimation<T>
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|
Constructor that takes a default animation and a duration in milliseconds that the cross fade animation should last.
|Modifier and Type||Method and Description|
Animates from the previous drawable to the current drawable in one of two ways.
public DrawableCrossFadeViewAnimation(GlideAnimation<T> defaultAnimation, int duration)
duration- The duration that the cross fade animation should run if there is something to cross fade from when a new
public boolean animate(T current, GlideAnimation.ViewAdapter adapter)
GlideAnimation<T extends Drawable>
current- The new resource that will be displayed in the view.
GlideAnimation.ViewAdapterwrapping a view that can at least return an