public class LottieValueAnimator extends BaseLottieAnimator implements android.view.Choreographer.FrameCallback
ValueAnimator that allows us to update start and end values
easily optimizing for the fact that we know that it's a value animator with 2 floats.| Modifier and Type | Field and Description |
|---|---|
protected boolean |
isRunning |
| Constructor and Description |
|---|
LottieValueAnimator() |
| Modifier and Type | Method and Description |
|---|---|
void |
cancel() |
void |
doFrame(long frameTimeNanos) |
void |
endAnimation() |
float |
getAnimatedFraction()
Returns the current value of the currently playing animation taking into
account direction, min and max frames.
|
java.lang.Object |
getAnimatedValue()
Returns a float representing the current value of the animation from 0 to 1
regardless of the animation speed, direction, or min and max frames.
|
float |
getAnimatedValueAbsolute()
Returns the current value of the animation from 0 to 1 regardless
of the animation speed, direction, or min and max frames.
|
long |
getDuration() |
float |
getFrame() |
float |
getMaxFrame() |
float |
getMinFrame() |
float |
getSpeed() |
boolean |
isRunning() |
void |
pauseAnimation() |
void |
playAnimation() |
protected void |
postFrameCallback() |
protected void |
removeFrameCallback() |
void |
resumeAnimation() |
void |
reverseAnimationSpeed() |
void |
setComposition(LottieComposition composition) |
void |
setFrame(int frame) |
void |
setMaxFrame(int maxFrame) |
void |
setMinAndMaxFrames(int minFrame,
int maxFrame) |
void |
setMinFrame(int minFrame) |
void |
setSpeed(float speed) |
addListener, addUpdateListener, getStartDelay, removeAllListeners, removeAllUpdateListeners, removeListener, removeUpdateListener, setDuration, setInterpolator, setStartDelayareAnimatorsEnabled, clone, end, getAnimatedValue, getCurrentPlayTime, getFrameDelay, getInterpolator, getRepeatCount, getRepeatMode, getTotalDuration, getValues, isStarted, ofArgb, ofFloat, ofInt, ofObject, ofPropertyValuesHolder, pause, resume, reverse, setCurrentFraction, setCurrentPlayTime, setEvaluator, setFloatValues, setFrameDelay, setIntValues, setObjectValues, setRepeatCount, setRepeatMode, setValues, start, toStringpublic java.lang.Object getAnimatedValue()
getAnimatedValue in class android.animation.ValueAnimatorpublic float getAnimatedValueAbsolute()
public float getAnimatedFraction()
getAnimatedFraction in class android.animation.ValueAnimatorpublic long getDuration()
getDuration in class android.animation.ValueAnimatorpublic float getFrame()
public boolean isRunning()
isRunning in class android.animation.ValueAnimatorpublic void doFrame(long frameTimeNanos)
doFrame in interface android.view.Choreographer.FrameCallbackpublic void setComposition(LottieComposition composition)
public void setFrame(int frame)
public void setMinFrame(int minFrame)
public void setMaxFrame(int maxFrame)
public void setMinAndMaxFrames(int minFrame,
int maxFrame)
public void reverseAnimationSpeed()
public void setSpeed(float speed)
public float getSpeed()
public void playAnimation()
public void endAnimation()
public void pauseAnimation()
public void resumeAnimation()
public void cancel()
cancel in class android.animation.ValueAnimatorpublic float getMinFrame()
public float getMaxFrame()
protected void postFrameCallback()
protected void removeFrameCallback()