Learn how to integrate lottie animations into your android app effortlessly.
Open your app-level build.gradle and add
dependencies {
implementation 'com.airbnb.android:lottie:6.0.0'
}
Place your your_animation.json in the app/src/main/res/raw/ folder.
<com.airbnb.lottie.LottieAnimationView
android:id="@+id/lottieIcon"
android:layout_width="150dp"
android:layout_height="150dp"
app:lottie_rawRes="@raw/your_animation"
app:lottie_autoPlay="true"
app:lottie_loop="true"
app:lottie_speed="1.0"
android:layout_gravity="center"/>
val animationView = findViewById<LottieAnimationView>(R.id.lottieIcon)
animationView.setAnimation(R.raw.your_animation)
animationView.playAnimation()
Find free animations at Unicornicons.