All Versions
71
Latest Version
Avg Release Cycle
38 days
Latest Release
-

Changelog History
Page 1

  • v5.3.0 Changes

    🆕 New Features

    • 👍 Allow animations in zip files to contain embedded base64 encoded images (#2110)
    • 👍 Allow zip files to contain embedded fonts. Context was added to some LottieCompositionFactory APIs to support this (#2102)
    • ➕ Add fontStyle and fontName as parameters in new overloads in FontAssetDelegate (#2103)
    • 👍 Allow decimal values for precomp size (#2138)
    • 👍 Allow interpolating in between gradeients that have different numbers of opacity stops (#2160)
    • 👌 Support box position in document data (#2139)
    • 👍 Allow repeater contents to be the target of dynamic properties (#2164)
    • Provide a global LottieTask listener to aid in Espresso idle resources (#2161)
    • 👍 Allow setting a default font extension (#2166)
    • ➕ Add an option to completely disable Lottie's network cache (#2158) ### 🐛 Bugs Fixed
    • 🛠 Fixed an NPE when decoding an invalid bitmap (#2117)
    • Only store application context in ImageAssetManager (#2163)
    • Prevent rounded corner effects from trying to round a shape that has control points on its vertices already (#2165)
    • 🏗 Pass LottieComposition directly while building layers to avoid race conditions (#2167)
  • v5.2.0 Changes

    🐛 Bugs Fixed

    • 👀 De-dupe gradient stops. On pre-Oreo devices, if you had color and opacity stops in the same place and used hardware acceleration, you may have seen artifacts at the stop positions as of 5.1.1 #20814
  • v5.1.1 Changes

    🆕 New Features

    • ➕ Added support for gradient opacity stops at different points than color stops (#2062)
    • 👍 Allow notifying LottieDrawable that system animations are disabled (#2063)

    🐛 Bugs Fixed

    • ✂ Removed some rounding errors that occurred when setting min/max frames (#2064)
    • Clear onVisibleAction one it is consumed (#2066)
    • 🛠 Fixed a Xiaomi Android 10 specific crash (#2061)
    • Made LottieAnimationView.start() mimic playAnimation (#2056)
    • ✂ Remove @RestrictTo from LottieNetworkFetcher (#2049)
  • v5.0.3 Changes

    🐛 Bugs Fixed

    • Invalidate the software renering bitmap when invalidate is called (#2034)
  • v5.0.2 Changes

    🐛 Bugs Fixed

    • Prevent a crash when using software rendering before a composition has been set (#2025)
  • v5.0.1 Changes

    🆕 New Features

    • 🚚 [Removed API] Removed the setScale(float) APIs from LottieAnimationView and LottieDrawable. The expected behavior was highly ambiguous when paired with other scale types and canvas transformations. For the vast majority of cases, ImageView.ScaleType should be sufficient. For remaining cases, you may apply transformations to Canvas and use LottieDrawable#draw directly.
    • ➕ Added support for the "Rounded Corners" effect on Shape and Rect layers (#1953)
    • Prior to 5.0, LottieAnimationView would always call setLayerType with either HARDWARE or SOFTWARE. In the hardware case, this would case Android to allocate a dedicated hardware buffer for the animation that had to be uploaded to the GPU separately. In the software case, LottieAnimationView would rely on View's internal drawing cache.

      This has a few disadvantages:

      • The hardware/software distinction happened at the LottieAnimationView level. That means that consumers of LottieDrawable (such as lottie-compose) had no way to choose a render mode.
      • Dedicated memory for Lottie was always allocated. In the software case, it would be a bitmap that is the size of the LottieAnimationView and in the hardware case, it was a dedicated hardware layer.

    Benefits as a result of this change:

    • Reduced memory consumption. In the hardware case, no new memory is allocated. In the software case, Lottie will create a bitmap that is the intersection of your View/Composition bounds mapped with the drawing transformation which often yields a surface are that is smaller than the entire LottieAnimationView.
    • lottie-compose now supports setting a RenderMode.
    • Custom uses of LottieDrawable now support setting a RenderMode via setRenderMode.
      • Lottie can now render outside of its composition bounds. To allow this with views such as LottieAnimationView, set clipToCompositionBounds to false on LottieDrawable or LottieAnimationView and clipChildren to false on the parent view. For Compose, use the clipToCompositionBounds parameter.
      • ⚡️ Prior to 5.0, LottieAnimationView handled all animation controls when the view's visibility or attach state changed. This worked fine for consumers of LottieAnimationView. However, custom uses of LottieDrawable were prone to leaking infinite animators if they did not properly handle cancelling animations correctly. This opens up the possibility for unexpected behavior and increased battery drain. Lottie now behaves more like animated drawables in the platform and moves this logic into the Drawable via its setVisible API. This should lead to no explicit behavior changes if you are using LottieAnimationView. However, if you are using LottieDrawable directly and were explicitly pausing/cancelling animations on lifecycle changes, you may want to cross check your expected behavior with that of LottieDrawable after this update. This change also resolved a long standing bug when Lottie is used in RecyclerViews due to the complex way in which RecyclerView handles View lifecycles (#1495). #1981
      • ➕ Add an API setClipToCompositionBounds on LottieAnimationView, LottieDrawable, and the LottieAnimation composable to prevent Lottie from clipping animations to the composition bounds.
      • ➕ Add an API to always render dynamically set bitmaps at the original animation bounds. Previously, dynamically set bitmaps would be rendered at their own size anchored to the top left of the original bitmap. This meant that if you wanted to supply a lower resolution bitmap to save memory, it would render smaller. The default behavior remains the same but you can enable setMaintainOriginalImageBounds to be able to supply lower resolution bitmaps (#1706).
      • ➕ Add support for LottieProperty.TEXT to use dynamic properties for text. This enables dynamic text support for lottie-compose (#1995).
      • ➕ Add getters for Marker fields (#1998)
      • ➕ Add support for reversed polystar paths (#2003)

    🐛 Bugs Fixed

    • 🛠 Fix a rare NPE multi-threaded race condition (#1959)
    • 👍 Don't cache dpScale to support moving Activities between different displays (#1915)
    • 🛠 Fix some cases that would prevent LottieAnimationView or LottieDrawable from being rendered by the Android Studio layout preview (#1984)
    • 👍 Better handle animations in which there is only a single color in a gradient (#1985)
    • 🛠 Fix a rare race condition that could leak a LottieTask object (#1986)
    • Call onAnimationEnd when animations are cancelled to be consistent with platform APIs (#1994)
    • 🛠 Fix a bug that would only render part of a path if the trim path extended from 0-100 and had an offset (#1999)
    • Add support for languages that use DIRECTIONALITY_NONSPACING_MARK like Hindi (#2001)
    • Prevent LottieAnimationView from overwriting user actions when restoring instance state (#2002)
  • v5.0.0 Changes

    🆕 New Features

    • ➕ Added support for the "Rounded Corners" effect on Shape and Rect layers (#1953)
    • Prior to 5.0, LottieAnimationView would always call setLayerType with either HARDWARE or SOFTWARE. In the hardware case, this would case Android to allocate a dedicated hardware buffer for the animation that had to be uploaded to the GPU separately. In the software case, LottieAnimationView would rely on View's internal drawing cache.

      This has a few disadvantages:

      • The hardware/software distinction happened at the LottieAnimationView level. That means that consumers of LottieDrawable (such as lottie-compose) had no way to choose a render mode.
      • Dedicated memory for Lottie was always allocated. In the software case, it would be a bitmap that is the size of the LottieAnimationView and in the hardware case, it was a dedicated hardware layer.

    Benefits as a result of this change:

    • Reduced memory consumption. In the hardware case, no new memory is allocated. In the software case, Lottie will create a bitmap that is the intersection of your View/Composition bounds mapped with the drawing transformation which often yields a surface are that is smaller than the entire LottieAnimationView.
    • lottie-compose now supports setting a RenderMode.
    • Custom uses of LottieDrawable now support setting a RenderMode via useSoftwareRendering.
    • Lottie can now render outside of its composition bounds via setClipToCompositionBounds. Unless you are using one of the new APIs, you should not have to change anything in your code as a result of this page. It is intended to be an entirely internal implementation detail that should improve performance by default and allow for new functionality.

      Please report any bugs or unexpected behavior that you experience as a result of this change. #1952, #1973.

      • ⚡️ Prior to 5.0, LottieAnimationView handled all animation controls when the view's visibility or attach state changed. This worked fine for consumers of LottieAnimationView. However, custom uses of LottieDrawable were prone to leaking infinite animators if they did not properly handle cancelling animations correctly. This opens up the possibility for unexpected behavior and increased battery drain. Lottie now behaves more like animated drawables in the platform and moves this logic into the Drawable via its setVisible API. This should lead to no explicit behavior changes if you are using LottieAnimationView. However, if you are using LottieDrawable directly and were explicitly pausing/cancelling animations on lifecycle changes, you may want to cross check your expected behavior with that of LottieDrawable after this update. This change also resolved a long standing bug when Lottie is used in RecyclerViews due to the complex way in which RecyclerView handles View lifecycles (#1495). #1981
      • ➕ Add an API setClipToCompositionBounds on LottieAnimationView, LottieDrawable, and the LottieAnimation composable to prevent Lottie from clipping animations to the composition bounds.
      • ➕ Add an API to always render dynamically set bitmaps at the original animation bounds. Previously, dynamically set bitmaps would be rendered at their own size anchored to the top left of the original bitmap. This meant that if you wanted to supply a lower resolution bitmap to save memory, it would render smaller. The default behavior remains the same but you can enable setMaintainOriginalImageBounds to be able to supply lower resolution bitmaps (#1706).
      • ➕ Add support for LottieProperty.TEXT to use dynamic properties for text. This enables dynamic text support for lottie-compose (#1995).
      • ➕ Add getters for Marker fields (#1998)
      • ➕ Add support for reversed polystar paths (#2003)

    🐛 Bugs Fixed

    • 🛠 Fix a rare NPE multi-threaded race condition (#1959)
    • 👍 Don't cache dpScale to support moving Activities between different displays (#1915)
    • 🛠 Fix some cases that would prevent LottieAnimationView or LottieDrawable from being rendered by the Android Studio layout preview (#1984)
    • 👍 Better handle animations in which there is only a single color in a gradient (#1985)
    • 🛠 Fix a rare race condition that could leak a LottieTask object (#1986)
    • Call onAnimationEnd when animations are cancelled to be consistent with platform APIs (#1994)
    • 🛠 Fix a bug that would only render part of a path if the trim path extended from 0-100 and had an offset (#1999)
    • Add support for languages that use DIRECTIONALITY_NONSPACING_MARK like Hindi (#2001)
    • Prevent LottieAnimationView from overwriting user actions when restoring instance state (#2002)
  • v4.2.2 Changes

    🐛 Bugs Fixed

    • ✂ Removed allocations when setting paint alpha prior to API 29 (#1929)
    • ➕ Added application/x-zip and application/x-zip-compressed as recognized zip mime types (#1950)
    • 🛠 Fixed a rare NPE in TransformKeyframeAnimation (#1955)
  • v4.2.1 Changes

    🔋 Features and Improvements

    • ⬆️ Upgraded to Compose 1.0.3 (#1913)
    • ➕ Added an overload to TextDelegate that provides layerName (#1931) ### 🐛 Bugs Fixed
    • ✂ Removed some extra Integer allocations with dynamic colors (#1927)
    • 🛠 Fixed two rare potential NPEs (#1917)
  • v4.2.0 Changes

    • 🛠 Fixed some rounding errors with trim paths (#1897)