commit | 0f0bc6f028b98a8ba3c9f7c77029814809aa2b46 | [log] [tgz] |
---|---|---|
author | Amanjeet Singh <amanjeetsingh150@gmail.com> | Sat Apr 23 23:34:19 2022 +0530 |
committer | GitHub <noreply@github.com> | Sat Apr 23 11:04:19 2022 -0700 |
tree | 48e1956c25940f113e693ad21d99445c14de2e53 | |
parent | 318b8ea21c220924b2f65ebfcf43bb225acbce5e [diff] |
Fixing memory leak of ShowcaseFragment (#2030) This PR fixes #2029 which refers to two memory leaks leading to the leak of `ShowcaseFragment`. ## Changelog * For fixing 1st memory leak in the issue we have used `requireActivity` inside for each loop as an explicit field outside the lambda which introduces a synthetic field of activity thus avoiding leak. You can compare this with the previous screenshot attached to the [issue](https://github.com/airbnb/lottie-android/issues/2029). This is inside [this](https://github.com/airbnb/lottie-android/commit/5d0893a82ed376967900bdb9323216994ee64de0) commit. ![Screenshot 2022-03-02 at 5 02 11 PM](https://user-images.githubusercontent.com/12881364/156354519-8feb7dfe-d26e-47be-9e8e-9f58f4632cbd.png) * For fixing 2nd memory leak we have added explicit context as a parameter in `clickListener` high order function field of `ShowcaseItem`. Correctly passing the application context to this removes the memory leak. This is inside [this](f2186776d123398272133489430a02bb15aa4224) commit.
Lottie is a mobile library for Android and iOS that parses Adobe After Effects animations exported as json with Bodymovin and renders them natively on mobile!
For the first time, designers can create and ship beautiful animations without an engineer painstakingly recreating it by hand. They say a picture is worth 1,000 words so here are 13,000:
Lottie is maintained and improved on nights and weekends. If you use Lottie in your app, please consider sponsoring it to help ensure that we can continue to improve the project we love. Click the sponsor button above to learn more
Gradle is the only supported build configuration, so just add the dependency to your project build.gradle
file:
dependencies { implementation 'com.airbnb.android:lottie:$lottieVersion' }
The latest Lottie version is:
The latest stable Lottie-Compose version is: Click here for more information on Lottie-Compose.
Lottie 2.8.0 and above only supports projects that have been migrated to androidx. For more information, read Google's migration guide.
Because development has started for Lottie Compose, Gradle, and the Android Gradle Plugin will be kept up to date with the latest canaries. This also requires you to use Android Studio Canary builds. Preview builds can be installed side by side with stable versions.