Create README.md
1 file changed
tree: 96f0d95926c940923ff1092a39b63c93e60daed4
  1. gradle/
  2. lottie/
  3. LottieSample/
  4. .gitignore
  5. build.gradle
  6. gradle.properties
  7. gradlew
  8. gradlew.bat
  9. LICENSE
  10. README.md
  11. settings.gradle
README.md

Lottie for Android (and iOS)

Lottie is a mobile library for Andorid 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 enginineer painstakingly recreating it be hand.

They say a picture is worth 1,000 words so here are 6,000

Alternatives

  1. Build animations by hand. Building animations by hand is a huge time commitment for design and engingeering across Android and iOS. It's often hard or even impossible to justify spending so much time to get an animation right.
  2. Gifs. Gifs are more than double the size of a bodymovin JSON and are rendered at a fixed size that can't be scaled up to match large and high density screens.
  3. Png sequences. Png sequences are even worse than gifs in that their file sizes are often 30-50x the size of the bodymovin json and also can't be scaled up.

Using Lottie

Using Lottie is as simple as adding an image to an ImageView. LottieAnimationView can consume JSON stored in one of two ways:

  1. By specifying the JSON filename in the /assets directory of your app.
  2. By passing in the raw JSONObject. With this, you have the option of hosting your animations on your server and downloading them through a network request! This opens up the possibility of a/b testing animations or providing animations that are very specific to the user such as an animated Eifel Tower when an Airbnb traveler books a listing in Paris.

Contributing

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.