Initial implementation of Lottie Compose (#1652)

This PR kicks off the work required to use Lottie with [Jetpack Compose](https://developer.android.com/jetpack/compose).
The API here will almost certainly change over time but I feel confident that this is a solid starting point with which to begin further API discussions.

The three primitives are:
* LottieAnimation: the `@Composable` that does the rendering aka replacement for LottieDrawable or LottieAnimationView.
* LottieAnimationSpec: a specification for where an animation should come from, whether it be from resources or the internet.
* LottieAnimationState: the current animation state (playing, progress, repeatCount, etc) and the ability to control the animation(start(), stop(), etc).

Its most basic usage is:
```
@Composable
fun MyComposable() {
  val animationSpec = remember { LottieAnimationSpec.Url("https://...") }
  LottieAnimation(animationSpec)
}
```

Or slightly more advanced:
```
@Composable
fun MyComposable(loaded: Boolean) {
  val animationSpec = remember { LottieAnimationSpec.Url(animationData.file) }
  val animationState = rememberLottieAnimationState()
  onCommit(loaded) {
    if (loaded) animationState.play()
  }
  LottieAnimation(animationSpec, animationState)
}
```
92 files changed
tree: 54a4272aaae1835b4879f5aa4800ca8e0051b65e
  1. .github/
  2. .idea/
  3. After Effects Samples/
  4. gifs/
  5. gradle/
  6. issue-repro/
  7. lottie/
  8. lottie-compose/
  9. LottieSample/
  10. sample-compose/
  11. .gitignore
  12. build.gradle
  13. CHANGELOG.md
  14. CODE_OF_CONDUCT.md
  15. credentials.tar.gz
  16. decrypt.sh
  17. deploy_snapshot.sh
  18. DESIGNER_NOTES.md
  19. gcloud_run.sh
  20. gcloud_setup.sh
  21. gradle.properties
  22. gradlew
  23. gradlew.bat
  24. LICENSE
  25. post_pr_comment.js
  26. README.md
  27. RELEASE.md
  28. secrets.tar.enc
  29. settings.gradle
  30. sign.sh
  31. version.sh
README.md

Lottie for Android, iOS, React Native, Web, and Windows

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:

Sponsors

Lottie is maintained and improved on nights and weekends. If you use Lottie in your app, please consider sponsoring it to help ensure that we can continue to improve the project we love. Click the sponsor button above to learn more

Lead Sponsors

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 {
  implementation 'com.airbnb.android:lottie:$lottieVersion'
}

The latest Lottie version is: lottieVersion

Lottie 2.8.0 and above only supports projects that have been migrated to androidx. For more information, read Google's migration guide.