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