commit | ca2f8a58f23b603f3cd765d951d8d1efa202ae67 | [log] [tgz] |
---|---|---|
author | Marek Hlava <mh@cardlay.com> | Tue Apr 05 18:13:43 2022 +0200 |
committer | GitHub <noreply@github.com> | Tue Apr 05 09:13:43 2022 -0700 |
tree | 62e708b7ba890d727601ecc14efcf4dcb6808bd2 | |
parent | 00a761238af041d14d3d5963fafaa0d4873c0af4 [diff] |
Support completable animations in Compose tests (#2051) The change in #1987 to always use `withInfiniteAnimationFrameNanos` prevents non-infinite animations from completing in Compose tests. I added a simple check to use `withFrameNanos` or `withInfiniteAnimationFrameNanos` based on the number of iterations. This fixes tests that wait for animations to complete, see sample `WalkthroughAnimationTest`. And `InfiniteAnimationTest` still passes. Let me know if I'm missing some other use case.
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.