commit | 88d776e81b17db586a5f14643383e8b3246b9699 | [log] [tgz] |
---|---|---|
author | Gabriel Peal <gabriel.peal@airbnb.com> | Tue Sep 19 18:49:45 2017 -0700 |
committer | Gabriel Peal <gabriel.peal@airbnb.com> | Tue Sep 19 18:49:45 2017 -0700 |
tree | 2dfd5ec9ddb5ff903a9069e36bbbc686b4d65173 | |
parent | b226b33398d4b3eeea3b4ca4695e0905b41ec818 [diff] |
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
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:
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' }