commit | 51188e6119f432e250f3d0a671bde8af77a796d4 | [log] [tgz] |
---|---|---|
author | Eli Hart <konakid@gmail.com> | Sat Feb 16 18:01:27 2019 -0600 |
committer | Gabriel Peal <gpeal@users.noreply.github.com> | Sat Feb 16 16:01:27 2019 -0800 |
tree | 451fee74526d6ba6d8869339fe99abf69e41408d | |
parent | 5f8f4861868fa578238a4cc05034fba1b1bfb7f3 [diff] |
Replace task observer thread with FutureTask subclass (#1083) I noticed that the observer thread approach that was being used to check when LottieTasks are done has indeterminate delay for reporting finished tasks, since the thread polls the task. It also adds overhead to create a thread for each task. Digging into it, it looks like we can simply use FutureTask's `done` function to know when the task is done. With this change the sample app seems to run perfectly, so functionality seems to be the same.
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.