com.bumptech.glide.request.animation
Interface GlideAnimation<R>

Type Parameters:
R - The type of the resource that should be animated to.
All Known Implementing Classes:
DrawableCrossFadeViewAnimation, NoAnimation, ViewAnimation, ViewPropertyAnimation

public interface GlideAnimation<R>

An interface that allows a transformation to be applied to Views in Targets in across resource types. Targets that wrap views will be able to provide all of the necessary arguments and start the animation. Those that do not will be unable to provide the necessary arguments and will therefore be forced to ignore the animation. This interface is a compromise that allows view animations in Glide's complex world of arbitrary resource types and arbitrary target types.


Nested Class Summary
static interface GlideAnimation.ViewAdapter
          An interface wrapping a view that exposes the necessary methods to run the various types of android animations (ViewAnimation, ViewPropertyAnimation and animated Drawables).
 
Method Summary
 boolean animate(R current, GlideAnimation.ViewAdapter adapter)
          Animates from the previous Drawable that is currently being displayed in the given view, if not null, to the new resource that should be displayed in the view.
 

Method Detail

animate

boolean animate(R current,
                GlideAnimation.ViewAdapter adapter)
Animates from the previous Drawable that is currently being displayed in the given view, if not null, to the new resource that should be displayed in the view.

Parameters:
current - The new resource that will be displayed in the view.
adapter - The GlideAnimation.ViewAdapter wrapping a view that can at least return an View from GlideAnimation.ViewAdapter.getView().
Returns:
True if int he process of running the animation the new resource was set on the view, false if the caller needs to manually set the current resource on the view.