lottie library android code example

Example 1: lottie dependency android

def lottieVersion = "3.4.0" 
implementation "com.airbnb.android:lottie:$lottieVersion"

Example 2: how to use lottie in android studio

<com.airbnb.lottie.LottieAnimationView
     android:id="@+id/animationView"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
     app:lottie_url="REPLACE_JSON_URL"
     app:lottie_autoPlay="true"
     app:lottie_loop="true"/>

Example 3: lottie animation github

dependencies {
  implementation 'com.airbnb.android:lottie:$lottieVersion'
}

Tags:

Misc Example