This demo app shows you how to bring Lottie animations to life on Android using Kotlin. It covers adding the Lottie dependency, loading animation files from theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/tutosrive/lottie-kt-test/llms.txt
Use this file to discover all available pages before exploring further.
assets folder, controlling playback programmatically, and switching between animations at runtime — all wired together in a single MainActivity.
Introduction
Learn what this project demonstrates and how Lottie fits into Android development.
Quickstart
Clone the repo, open it in Android Studio, and run your first Lottie animation in minutes.
Implementation Guide
Step-by-step walkthroughs covering project setup, adding the dependency, and controlling animations.
API Reference
Explore the LottieAnimationView API, XML attributes, and build configuration used in this project.
How it works
The app renders a Lottie animation (wh.json) on launch and lets you tap a button to toggle between two animations (wh.json and logo2.json). Both JSON files live in app/src/main/assets/ and are loaded at runtime.
Add the Lottie dependency
Declare
com.airbnb.android:lottie:6.7.1 in your build.gradle.kts dependencies block.Place animation files in assets
Copy your Lottie JSON files into
app/src/main/assets/. The library loads them by filename.Add LottieAnimationView to your layout
Drop a
<com.airbnb.lottie.LottieAnimationView> into your XML layout and set attributes like lottie_autoPlay and lottie_loop.