Have software rendering fallback on hardware acceleration when too large (#1190)

In cases where LottieAnimationView is large and software rendering is used, Android may not be able to generate a bitmap large enough which causes nothing to be shown. Rather than have this happen, fall back on hardware acceleration which is supported > api 11. Potentially taking a perf hit and displaying is better than a blank screen and not displaying at all.

Encountered this where upon rotation on a tablet, the view became big enough that generation of the bitmap failed.
1 file changed
tree: 94d1de43baef2df6c87be8dfa9da454cb7f198f5
  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
  15. gcloud_run.sh
  16. gcloud_setup.sh
  17. gradle.properties
  18. gradlew
  19. gradlew.bat
  21. post_pr_comment.js
  22. README.md
  23. secrets.tar.enc
  24. settings.gradle
  25. sign.sh
  26. version.sh

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







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.