com.nineoldandroids.animation
Class TimeAnimator
java.lang.Object
com.nineoldandroids.animation.Animator
com.nineoldandroids.animation.ValueAnimator
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. |
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 |
TimeAnimator
public TimeAnimator()
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.