public class LinearTimeBasedFloatValueAnimator extends TimeBasedValueAnimator<Float>
TimeBasedValueAnimator
that linearly animates a float value between two
values over a given time.endValue, startValue
Constructor and Description |
---|
LinearTimeBasedFloatValueAnimator(float start,
float finish,
long duration)
Construct a
LinearTimeBasedFloatValueAnimator with the given
start and finish values, and the given duration in millseconds. |
Modifier and Type | Method and Description |
---|---|
Float |
calculateValue(double pc)
Calculates the value of the float based on the start, end and current
percentage.
|
hasFinished, isComplete, nextValue, reset
public LinearTimeBasedFloatValueAnimator(float start, float finish, long duration)
LinearTimeBasedFloatValueAnimator
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 Float calculateValue(double pc)
calculateValue
in class TimeBasedValueAnimator<Float>
pc
- The percentagepc
along between start and finish