Package 

Class LottieValueCallback


  • 
    public class LottieValueCallback<T>
    
                        

    Allows you to set a callback on a resolved com.airbnb.lottie.model.KeyPath to modify its animation values at runtime. If your dynamic property does the following, you must call invalidate or invalidateSelf each time you want to update this value. 1. Use SOFTWARE 2. Rendering a static image (the animation is either paused or there are no values changing within the animation itself) When using software rendering, Lottie caches the internal rendering bitmap. Whenever the animation changes internally, Lottie knows to invalidate the bitmap and re-render it on the next frame. If the animation never changes but your dynamic property does outside of Lottie, Lottie must be notified that it changed in order to set the bitmap as dirty and re-render it on the next frame.

    • Constructor Detail

      • LottieValueCallback

        LottieValueCallback()
      • LottieValueCallback

        LottieValueCallback(T staticValue)
    • Method Detail

      • getValue

        @Nullable() 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.Refer to the javadoc for this class for a special case that requires manual invalidationeach time you want to return something different from this method.

      • getValue

        @Nullable() 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.Refer to the javadoc for this class for a special case that requires manual invalidationeach time you want to return something different from this method.