public class FloatArrayValueAnimator extends Object implements ValueAnimator<float[]>
ValueAnimator
capable of producing float arrays from
a set of potentially independent underlying ValueAnimator
s.Constructor and Description |
---|
FloatArrayValueAnimator(ValueAnimator<Float>... animators)
Construct from an array of
ValueAnimator s |
Modifier and Type | Method and Description |
---|---|
boolean |
hasFinished()
Has the animator finished animating the value.
|
static FloatArrayValueAnimator |
makeLinear(int duration,
float... maxs)
Construct a new FloatArrayValueAnimator from an array of
values using
LinearFloatValueAnimator s with the
range -max to +max and the given duration. |
static FloatArrayValueAnimator |
makeLinear(int duration,
int count,
float start,
float finish)
Construct a new FloatArrayValueAnimator from count
LinearFloatValueAnimator s with the given start
and finish values, and the given duration. |
static FloatArrayValueAnimator |
makeRandomLinear(int duration,
float... maxs)
Construct a new FloatArrayValueAnimator from an array of
values using
RandomLinearFloatValueAnimator s with the
range -max to +max and the given duration. |
static FloatArrayValueAnimator |
makeRandomLinear(int duration,
int count,
float start,
float finish)
Construct a new FloatArrayValueAnimator from count
RandomLinearFloatValueAnimator s with the given start
and finish values, and the given duration. |
float[] |
nextValue()
Get the next value.
|
void |
reset()
Reset the animator back to its initial condition.
|
@SafeVarargs public FloatArrayValueAnimator(ValueAnimator<Float>... animators)
ValueAnimator
sanimators
- the animatorspublic static FloatArrayValueAnimator makeLinear(int duration, float... maxs)
LinearFloatValueAnimator
s with the
range -max to +max and the given duration.duration
- the duration of the underlying animatorsmaxs
- max distance from 0 (+/-)FloatArrayValueAnimator
public static FloatArrayValueAnimator makeLinear(int duration, int count, float start, float finish)
LinearFloatValueAnimator
s with the given start
and finish values, and the given duration.duration
- the durationcount
- the number of animatorsstart
- the starting valuefinish
- the finishing valueFloatArrayValueAnimator
public static FloatArrayValueAnimator makeRandomLinear(int duration, float... maxs)
RandomLinearFloatValueAnimator
s with the
range -max to +max and the given duration.duration
- the duration of the underlying animatorsmaxs
- max distance from 0 (+/-)FloatArrayValueAnimator
public static FloatArrayValueAnimator makeRandomLinear(int duration, int count, float start, float finish)
RandomLinearFloatValueAnimator
s with the given start
and finish values, and the given duration.duration
- the durationcount
- the number of animatorsstart
- the starting valuefinish
- the finishing valueFloatArrayValueAnimator
public float[] nextValue()
ValueAnimator
nextValue
in interface ValueAnimator<float[]>
public boolean hasFinished()
ValueAnimator
hasFinished
in interface ValueAnimator<float[]>
public void reset()
ValueAnimator
reset
in interface ValueAnimator<float[]>