Learn how to integrate lottie animations into your android app effortlessly.
In your app-level build.gradle
dependencies {
implementation 'app.rive:rive-android:4.1.0'
}
Put your .riv file in res/raw/ (create the folder if it doesn’t exist).
<app.rive.runtime.kotlin.RiveAnimationView
android:id="@+id/riveView"
android:layout_width="150dp"
android:layout_height="150dp"
app:riveResource="@raw/your_animation"
app:riveArtboard="Main"
app:riveAnimation="Idle"
app:riveAutoplay="true" />
val riveView = findViewById<RiveAnimationView>(R.id.riveView)
riveView.play("Idle")
riveView.pause()
riveView.setAnimation("Click")
Find free animations at Unicornicons.