Respect disabled system animations (#1187)

If systemAnimationScale == 0, the lottie animation will play then immediately jump to the last frame, or only jump to the last frame if it is a loop animation.
This solution handles if the dev move the animation at some percentage, change first or last frame or play the animation in reverse.

Really useful for testing purpose in order to not overload the main thread

Unittest are OK, I couldn't start the uiTest as it require the AWS key.

I couldn't add unittest as it obviously doesn't try to start the animations in it

Fixes #1129 
3 files changed
tree: c0903d09a47d46db9111ba7d956e70c99060380f
  1. .github/
  2. .idea/
  3. After Effects Samples/
  4. gifs/
  5. gradle/
  6. lottie/
  7. LottieSample/
  8. .gitignore
  9. .travis.yml
  10. build.gradle
  11. CHANGELOG.md
  12. credentials.tar.gz
  13. decrypt.sh
  14. DESIGNER_NOTES.md
  15. gcloud_run.sh
  16. gcloud_setup.sh
  17. gradle.properties
  18. gradlew
  19. gradlew.bat
  20. LICENSE
  21. post_pr_comment.js
  22. README.md
  23. secrets.tar.enc
  24. settings.gradle
  25. sign.sh
  26. version.sh
README.md

Lottie for Android, iOS, React Native, Web, and Windows

Build Status

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:

View documentation, FAQ, help, examples, and more at airbnb.io/lottie

Example1

Example2

Example3

Community

Example4

Download

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: lottieVersion

Lottie 2.8.0 and above only supports projects that have been migrated to androidx. For more information, read Google's migration guide.