Use save and restore instead of manually restoring clipRect

Views/drawables/canvases are not supposed to be able to expand their
clip rect so that views can properly clip their children.
See these docs for more info: https://developer.android.com/reference/android/graphics/Canvas.html#clipRect(android.graphics.RectF, android.graphics.Region.Op)

We were relying on undesired behavior before to restore the clip
rect which seemed to work fine for software accelerated canvases
but not hardware accelerated ones. Swiching to save/restore is not
only more accurate but fixes clipping issues.
Fixes #457
1 file changed
tree: 2dfd5ec9ddb5ff903a9069e36bbbc686b4d65173
  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'
}