com.bumptech.glide.request.animation
Class ViewPropertyAnimation<R>

java.lang.Object
  extended by com.bumptech.glide.request.animation.ViewPropertyAnimation<R>
Type Parameters:
R - The type of the resource displayed in the view that is animated
All Implemented Interfaces:
GlideAnimation<R>

public class ViewPropertyAnimation<R>
extends Object
implements GlideAnimation<R>

A GlideAnimation that accepts an interface that can apply an animation like a ViewPropertyAnimator or a ObjectAnimator to an View.


Nested Class Summary
static interface ViewPropertyAnimation.Animator
          An interface that allows an animation to be applied on or started from an View.
 
Nested classes/interfaces inherited from interface com.bumptech.glide.request.animation.GlideAnimation
GlideAnimation.ViewAdapter
 
Constructor Summary
ViewPropertyAnimation(ViewPropertyAnimation.Animator animator)
          Constructor for a view property animation that takes an ViewPropertyAnimation.Animator interface that can apply an animation to a view.
 
Method Summary
 boolean animate(R current, GlideAnimation.ViewAdapter adapter)
          Always applies the ViewPropertyAnimation.Animator given in the constructor to the given view and returns false because the animator cannot set the new resource on the view.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ViewPropertyAnimation

public ViewPropertyAnimation(ViewPropertyAnimation.Animator animator)
Constructor for a view property animation that takes an ViewPropertyAnimation.Animator interface that can apply an animation to a view.

Parameters:
animator - The animator to use.
Method Detail

animate

public boolean animate(R current,
                       GlideAnimation.ViewAdapter adapter)
Always applies the ViewPropertyAnimation.Animator given in the constructor to the given view and returns false because the animator cannot set the new resource on the view.

Specified by:
animate in interface GlideAnimation<R>
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.