commit | 2354bad616c417aa246ec72a95aa372274d31250 | [log] [tgz] |
---|---|---|
author | Gabriel Peal <gpeal@users.noreply.github.com> | Thu May 30 13:57:21 2019 -0700 |
committer | GitHub <noreply@github.com> | Thu May 30 13:57:21 2019 -0700 |
tree | 8c9ac3ff52182e07030c7e02937a52eeaf586bb2 | |
parent | 891e73fa1146196b4cde7c7873ca1a352fc40a58 [diff] |
Use moshi implementation for json parsing (#1234) There's a dependency on OKIO & 8 classes copied from Moshi. Need to figure out best path forward. Ideally we don't depend on all of Moshi but still get the gains of the new JsonReader & Options api. This should fix the random Android 8 crashes. Performance I ran the snapshot tests with ~1800 animations and summed up just the parsing time. The old parsing code took 13,145ms and 13,645ms on each test run (avg 13,395ms). The new code took 12,858ms each time. There aren't enough trials to deduce statistical differences but if these numbers hold, the new code parses ~5% faster. It does reduce memory allocations during parsing which may contribute to the performance improvement. I'm leaning on merging this to hopefully fix #667
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 { implementation 'com.airbnb.android:lottie:$lottieVersion' }
The latest Lottie version is:
Lottie 2.8.0 and above only supports projects that have been migrated to androidx. For more information, read Google's migration guide.