Gradle is the only supported build configuration, so just add the dependency to your project build.gradle
file:
dependencies { compile 'com.airbnb.android:lottie-android:1.0.0' }
Using Lottie is as simple as adding an image to an ImageView. LottieAnimationView
can consume JSON stored in one of two ways:
Lottie is named after a German film director and the foremost pioneer of silhouette animation. Her best known films are The Adventures of Prince Achmed (1926) – the oldest surviving feature-length animated film, preceding Walt Disney's feature-length Snow White and the Seven Dwarfs (1937) by over ten years The art of Lotte Reineger
##Try it out Clone this repository and run the LottieSample module to see a bunch of sample animations. The JSON files for them are located in /assets.
Contributers are more than welcome. Just upload a PR with a description of your changes. Lottie uses Facebook screenshot tests for Android to identify pixel level changes/breakages. Please run ./gradlew --daemon recordMode screenshotTests
before uploading a PR to ensure that nothing has broken.
If you would like to add more JSON files and screenshot tests, feel free to do so and add the test to LottieTest
.