com.nineoldandroids.animation
Class TimeAnimator

java.lang.Object
  extended by com.nineoldandroids.animation.Animator
      extended by com.nineoldandroids.animation.ValueAnimator
          extended by com.nineoldandroids.animation.TimeAnimator
All Implemented Interfaces:
Cloneable

public class TimeAnimator
extends ValueAnimator

This class provides a simple callback mechanism to listeners that is synchronized with other animators in the system. There is no duration, interpolation, or object value-setting with this Animator. Instead, it is simply started and proceeds to send out events on every animation frame to its TimeListener (if set), with information about this animator, the total elapsed time, and the time since the last animation frame.


Nested Class Summary
static interface TimeAnimator.TimeListener
          Implementors of this interface can set themselves as update listeners to a TimeAnimator instance to receive callbacks on every animation frame to receive the total time since the animator started and the delta time since the last frame.
 
Nested classes/interfaces inherited from class com.nineoldandroids.animation.ValueAnimator
ValueAnimator.AnimatorUpdateListener
 
Nested classes/interfaces inherited from class com.nineoldandroids.animation.Animator
Animator.AnimatorListener
 
Field Summary
 
Fields inherited from class com.nineoldandroids.animation.ValueAnimator
INFINITE, RESTART, REVERSE
 
Constructor Summary
TimeAnimator()
           
 
Method Summary
 void setTimeListener(TimeAnimator.TimeListener listener)
          Sets a listener that is sent update events throughout the life of an animation.
 
Methods inherited from class com.nineoldandroids.animation.ValueAnimator
addUpdateListener, cancel, clearAllAnimations, clone, end, getAnimatedFraction, getAnimatedValue, getAnimatedValue, getCurrentAnimationsCount, getCurrentPlayTime, getDuration, getFrameDelay, getInterpolator, getRepeatCount, getRepeatMode, getStartDelay, getValues, isRunning, isStarted, ofFloat, ofInt, ofObject, ofPropertyValuesHolder, removeAllUpdateListeners, removeUpdateListener, reverse, setCurrentPlayTime, setDuration, setEvaluator, setFloatValues, setFrameDelay, setInterpolator, setIntValues, setObjectValues, setRepeatCount, setRepeatMode, setStartDelay, setValues, start, toString
 
Methods inherited from class com.nineoldandroids.animation.Animator
addListener, getListeners, removeAllListeners, removeListener, setTarget, setupEndValues, setupStartValues
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TimeAnimator

public TimeAnimator()
Method Detail

setTimeListener

public void setTimeListener(TimeAnimator.TimeListener listener)
Sets a listener that is sent update events throughout the life of an animation.

Parameters:
listener - the listener to be set.