How to implement animation or lottie files in android.
How to implement animation or lottie files in android. First of all, implement latest dependency in build.gradle file. implementation 'com.airbnb.android:lottie:4.1.0' //for lottie files Create one raw folder and put your JSON file in that Then in xml file put this code. < com.airbnb.lottie.LottieAnimationView android :id ="@+id/animationView" android :layout_width ="100dp" android :layout_height ="80dp" app :lottie_autoPlay ="true" app :lottie_loop ="true" app :lottie_rawRes ="@raw/lottie" /> //here put your own lottie file have a great day.
Comments
Post a Comment