public class LinearTimeBasedIntegerValueAnimator extends TimeBasedValueAnimator<Integer>
TimeBasedValueAnimator
that linearly animates a int value between two
values over a given time.endValue, startValue
Constructor and Description |
---|
LinearTimeBasedIntegerValueAnimator(int start,
int finish,
long duration)
Construct a
LinearTimeBasedIntegerValueAnimator with the given
start and finish values, and the given duration in millseconds. |
Modifier and Type | Method and Description |
---|---|
Integer |
calculateValue(double pc)
Calculates the value of the int based on the start, end and current
percentage.
|
hasFinished, isComplete, nextValue, reset
public LinearTimeBasedIntegerValueAnimator(int start, int finish, long duration)
LinearTimeBasedIntegerValueAnimator
with the given
start and finish values, and the given duration in millseconds.
The animation starts on the first call to makeNextValue()
and completes once duration ticks have been reached.start
- start valuefinish
- stop valueduration
- in millisecondspublic Integer calculateValue(double pc)
calculateValue
in class TimeBasedValueAnimator<Integer>
pc
- The percentagepc
along between start and finish