The official documentation for lottie-android provides further information on these configurations. Your first Android project with Lottie animations is ready to go! All that’s left for you to do from here is to configure your project further and customize the animation behaviour. Update your layout code to use the bundled animation json and follow the same procedure.ĭownload the animation, rename it to animation.json or animation.zip depending on your use-case, and place into your raw resources folder. If your animation contains images, you can bundle them all together in a. If your project does not have one, create it by going to File>New>Folder>Raw Resources Folder. If you need your animations to work offline, you can bundle your animations with your application by including them in your projects raw resources. Add it to your layouts where you want to place your animations. The lottie-android library provides a LottieAnimationView which will take care of rendering your animations for you. Replace lottieVersion with the latest available. If you’re using a different IDE, you can still use the same instructions.įrom your project structure panel, select your projects adle file and add the following lines inside your dependencies block: This guide assumes that you are using Android Studio as your IDE. Getting started with Lottie is very straightforward.
Just scan the QR code under the animation on LottieFiles with the app to preview the animation. It's important to test your selected Lottie using the LottieFiles app for Android to make sure the animation you've chosen will play the same Android as sometimes not all animations are built with features supported in the Lottie Android player.
You may have your own or you may want to select one from the 1000s of Lottie animations available for free on LottieFiles.