lottie-android

Render After Effects animations natively on Android and iOS, Web, and React Native

APACHE-2.0 License

Stars
34.6K
Committers
154

Bot releases are hidden (Show)

lottie-android - 6.5.2 Latest Release

Published by gpeal about 1 month ago

Bugs Fixed

  • Fix a NPE when running Lottie in instrumentation tests (#2546)
  • Add support for new reduced motion options in Compose (#2542)
  • [Compose] Add support for new reduced motion settings (#2543)
lottie-android - 6.5.1

Published by gpeal about 1 month ago

Bugs Fixed

  • Fix value callback is not called for PathKeyframeAnimation (#2540)
  • Fix shadow softness accuracy (#2541)
  • Add a global configuration to control reduced motion settings for a11y (#2536)
  • Fix a NPE on ImageAssetManager#getContext (#2532)
  • Improve strokes with skew (#2531)
  • LottieCompositionFactory: Avoid NPE when animation contains a Font Family and Context is null (#2530)
  • LottieCompositionFactory: Add factory methods that take an okio Source (#2527)
  • LottieCompositionFactory#fromZipStreamSyncInternal close FileOutputStream (#2548)
lottie-android - 6.5.0

Published by gpeal 3 months ago

New Features

  • Apply blend modes to layers and add Multiply (#2519)
  • Add initial support for text range selectors (#2518)
  • Add a new feature flag API to allow for opting into newer platform features (#2512)
  • Add an API to get the unscaled width/height of a composition (#2514)

Bugs Fixes

  • Improve the accuracy of drop shadow position and softness (#2523)
  • Treat appcompat as an API dependency (#2507)
lottie-android - 6.4.0

Published by gpeal 8 months ago

New Features

  • Add support for reduced motion marker names (#2451)
  • Support GZIP and TGS network downloads (#2454)

Bugs Fixed

  • Allow easings to go <0 and >1 (#2457)
  • Fix a memory leak in LottieTask (#2465)
  • Prevent play from working after a non-Lottie drawable was set and then returned back (#2468)
  • Respect autoPlay in LottieAnimationView when setting a new composition (#2469)
  • Call LottieTask synchronously when already on the main thread (#2470)
  • Properly rescale bitmaps when the system scale changes (#2475)

Compose

  • Add safe mode (#2455)
  • Clarify clipToCompositionBounds docs (#2473)

New Contributors

Full Changelog: https://github.com/airbnb/lottie-android/compare/v6.3.0...v6.4.0

lottie-android - 6.3.0

Published by gpeal 10 months ago

New Features

  • [Compose] Add LottiePainter and rememberLottiePainter to use Lottie anywhere a Painter can be used (#2442)
  • [Compose] Constrain unconstrainted bounds when the other dimension is constrained (#2437)
  • Add support dynamic path properties on shape contents (#2439)
  • Add support for gzipped and tgs files (#2435)
  • Add an option to clip text if it extends beyond its bounding box (#2412)

Bugs Fixes

  • Make all LottieAnimationView setters idempotent (#2441)
  • Fix a rendering artifact for polygons with large strokes (#2440)
  • Re-scale bitmaps if the system scale changes (#2438)
  • Handle null color callbacks in solid layer (#2434)
  • Handle null shape data end values (#2433)
  • Fix gradient colors when the progress is <0 or > 1 (#2427)
lottie-android - 6.2.0

Published by gpeal 11 months ago

New Features

  • Implement screen, overlay, darken, lighten, and add blend modes (#2408)
  • Implement auto-orient (#2416)
  • Allow globally configuring asyncUpdates (#2356)
  • Add an optional close param to LottieCompositionFactory.fromJsonReader (#2342)
  • Allow dynamic properties for solid layer colors (#2378)
  • Update baseline profiles (#2404)
  • Add a ZipInputStream overload to LottieAnimationView.setAnimation (#2411)

Bugs Fixed

  • Upgrade okio (#2418)
  • Improve cache hits for synchronous LottieCompositionFactory methods (#2379)
  • Fix gradient interpolation for opacity stops beyond the last color stop (#2377)
  • Fix Potential NPE In NetworkCache.clearCache (#2364)
  • Fix an IllegalArgumentException when creating a bitmap (#2351)
  • Fix rounded corners for non-closed paths (#2405)
  • Fix varying opacity stops across keyframes in the same gradient (#2406)
  • Fix a NullPointerException in ColorKeyframeAnimation (#2407)
lottie-android - 6.1.0

Published by gpeal over 1 year ago

New Features

  • New multithreaded asyncUpdates feature which moves the entire update phase of an animation off of the main thread. For more information, refer to this blog post. (#2276)
  • Allow LottieCompositionFactory to not close input streams (#2286 and #2319)
  • Allow Lottie to be initialized multiple times (#2323)

Bugs Fixed

  • Close input streams for cache hits (#2253)
  • Always use ApplicationContext in ImageAssetManager to ensure it can be reused (#2289)
  • Hold weak references to success/failure listeners (#2293)
  • Add default values for line join and cap types (#2337)
  • Apply layer parent opacity to text (#2336)

Compose

  • Key dynamic properties on composition to ensure that they are set if the composition changes (#2290)
  • Add @JvmOverloads to LottieAnimation to improve binary compatibility (#2320)
lottie-android - 6.0.1

Published by gpeal over 1 year ago

Bugs Fixes

  • Allow loading URLs with a length of greater than 255 chars (#2311)
lottie-android - 6.0.0

Published by gpeal over 1 year ago

New Features

  • Major overhaul of text layout. Text layout should be more consistent across the board (#2162)
  • 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 gradients 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)
  • Allow setting a font map for custom fonts (#2180)
  • Allow ImageAssetDelegate to be used when a drawable doesn't have a callback (#2183)
  • Make Layer name and refId public (#2188)
  • Allow rendering at the composition frame rate (#2184)

Bugs Fixed

  • Fixed an NPE when decoding an invalid bitmap and for transform opacity, and transform anchor position (#2117, #2179, and #2197)
  • 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)
  • Allow progress to be restored from saved state (#2072)
  • Take top and left Drawable bounds into account to support things like SeekBar thumbs (#2182)
  • Use the correct cache key for network animations (#2198)

Compose

  • Add reverseOnRepeat (#2128)
  • Allow setting a font map for custom fonts (#2180)
  • Allow images to be rendered (#2183)
lottie-android - 5.2.0

Published by gpeal over 2 years ago

Compose Breaking Change
LottieAnimation now takes progress as a () -> Float rather than a Float. This allows Lottie to redraw without triggering a recomposition every time progress updates. For more information, refer to the Compose phase docs. The existing API will exist as deprecated for one more release but will then be removed. For the vast majority of use cases:

LottieAnimation(composition, progress)

will become:

LottieAnimation(composition, { progress })

or

LottieAnimation(
  composition = composition,
  progress = { progress }
)

#2078.

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
lottie-android - 5.1.1

Published by gpeal over 2 years ago

5.1.1

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)
lottie-android - 5.0.3

Published by gpeal over 2 years ago

Bugs Fixed

  • Invalidate the software renering bitmap when invalidate is called (#2034)
lottie-android - 5.0.2

Published by gpeal over 2 years ago

Bugs Fixed

  • Prevent a crash when using software rendering before a composition has been set (#2025)
lottie-android - 5.0.1

Published by gpeal over 2 years ago

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)
lottie-android - 4.2.1

Published by gpeal almost 3 years ago

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)
lottie-android - 4.2.0

Published by gpeal almost 3 years ago

  • Fixed some rounding errors with trim paths (#1897)
lottie-android - 4.1.0

Published by gpeal about 3 years ago

  • Added support for gaussian blur effects (#1859)
  • Added support for drop shadow effects (#1860)

BREAKING CHANGES
Before this release, drop shadows and blurs were completely ignored. They will now be rendered. In most cases, they will now be rendered correctly. However, you should read the implementation details here if they are not.

lottie-android - 4.0.0

Published by gpeal about 3 years ago

  • First stable release of Lottie Compose. For documentation, refer to the docs site.
  • Sync versions between Android and Compose libraries
lottie-android - Compose 1.0.0-rc02-1

Published by gpeal over 3 years ago

  • Upgrade to Compose rc02
  • Add support for ContentScale and Alignment just like the Image composable (#1844)
  • Automatically load fonts if possible and allow setting fonts via dynamic properties (#1842)
  • Add LottieCancellationBehavior support to animateLottieCompositionAsState (#1846)
  • Allow custom cache keys/cache skipping (#1847)
  • Always respect LottieClipSpec (#1848)
lottie-android - 3.7.2

Published by gpeal over 3 years ago

Support for lottie-compose 1.0.0-rc02-1