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. .gitignore
  3. .idea/
  4. After Effects Samples/
  5. CHANGELOG.md
  6. CODE_OF_CONDUCT.md
  7. DESIGNER_NOTES.md
  8. LICENSE
  9. LottieSample/
  10. README.md
  11. RELEASE.md
  12. build.gradle
  13. credentials.tar.gz
  14. decrypt.sh
  15. deploy_snapshot.sh
  16. gcloud_run.sh
  17. gcloud_setup.sh
  18. gifs/
  19. gradle.properties
  20. gradle/
  21. gradlew
  22. gradlew.bat
  23. issue-repro/
  24. lottie-compose/
  25. lottie/
  26. post_pr_comment.js
  27. sample-compose/
  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.