T
- Type produce by animatorpublic class LoopingValueAnimator<T> extends Object implements ValueAnimator<T>
ValueAnimator
that can wrap another
ValueAnimator
to produce looping behavior by
resetting when the animator has finished.Constructor and Description |
---|
LoopingValueAnimator(ValueAnimator<T> animator)
Construct around the given
ValueAnimator to
provide looping behavior. |
Modifier and Type | Method and Description |
---|---|
boolean |
hasFinished()
Has the animator finished animating the value.
|
static <T> LoopingValueAnimator<T> |
loop(ValueAnimator<T> animator)
Construct a new
LoopingValueAnimator from a ValueAnimator . |
T |
nextValue()
Get the next value.
|
void |
reset()
Reset the animator back to its initial condition.
|
public LoopingValueAnimator(ValueAnimator<T> animator)
ValueAnimator
to
provide looping behavior.animator
- animator to looppublic T nextValue()
ValueAnimator
nextValue
in interface ValueAnimator<T>
public boolean hasFinished()
ValueAnimator
hasFinished
in interface ValueAnimator<T>
public void reset()
ValueAnimator
reset
in interface ValueAnimator<T>
public static <T> LoopingValueAnimator<T> loop(ValueAnimator<T> animator)
LoopingValueAnimator
from a ValueAnimator
.T
- Type produce by animatoranimator
- animator to loopLoopingValueAnimator