Lots of scaling improvements (#461)

Lottie should now respect scaling and scale types much better. Things like centerInside and centerCrop will now work as expected. The only limitation is that if you set the scale to larger than the canvas then it will only scale up to the maximum size for the current scale type (centerInside/centerCrop). If you change the canvas scaling from extraScale * extraScale then it will scale larger but it'll also end up scaling when you have a fixed width which you don't actually want. For now, I'm optimizing for the case where you want the animation to fit the view.
28 files changed
tree: f03779a5f456f5ac942c7b6b4c84fc8374b219bb
  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. DESIGNER_NOTES.md
  13. gradle.properties
  14. gradlew
  15. gradlew.bat
  16. LICENSE
  17. README.md
  18. settings.gradle
README.md

Lottie for Android, iOS, and React Native

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 {  
  compile 'com.airbnb.android:lottie:2.2.3'
}