Package com.airbnb.lottie.value
Class LottieValueCallback<T>
- java.lang.Object
-
- com.airbnb.lottie.value.LottieValueCallback<T>
-
- Direct Known Subclasses:
LottieInterpolatedFloatValue,LottieInterpolatedIntegerValue,LottieInterpolatedPointValue,LottieRelativeFloatValueCallback,LottieRelativeIntegerValueCallback,LottieRelativePointValueCallback
public class LottieValueCallback<T> extends java.lang.ObjectAllows you to set a callback on a resolvedKeyPathto modify its animation values at runtime.
-
-
Field Summary
Fields Modifier and Type Field Description protected TvalueThis can be set withsetValue(Object)to use a value instead of deferring to the callback.
-
Constructor Summary
Constructors Constructor Description LottieValueCallback()LottieValueCallback(T staticValue)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TgetValue(LottieFrameInfo<T> frameInfo)Override this if you haven't set a static value in the constructor or with setValue.TgetValueInternal(float startFrame, float endFrame, T startValue, T endValue, float linearKeyframeProgress, float interpolatedKeyframeProgress, float overallProgress)voidsetAnimation(BaseKeyframeAnimation<?,?> animation)voidsetValue(T value)
-
-
-
Field Detail
-
value
@Nullable protected T value
This can be set withsetValue(Object)to use a value instead of deferring to the callback.
-
-
Constructor Detail
-
LottieValueCallback
public LottieValueCallback()
-
LottieValueCallback
public LottieValueCallback(@Nullable T staticValue)
-
-
Method Detail
-
getValue
@Nullable public T getValue(LottieFrameInfo<T> frameInfo)
Override this if you haven't set a static value in the constructor or with setValue. Return null to resort to the default value.
-
setValue
public final void setValue(@Nullable T value)
-
getValueInternal
@Nullable public final T getValueInternal(float startFrame, float endFrame, T startValue, T endValue, float linearKeyframeProgress, float interpolatedKeyframeProgress, float overallProgress)
-
setAnimation
public final void setAnimation(@Nullable BaseKeyframeAnimation<?,?> animation)
-
-