引入依赖

    api 'com.airbnb.android:lottie:+'

拷贝动画资源
【Android】【Lottie】在Android中使用Lottie动画_第1张图片
布局中使用LottieView

    

代码中进行控制

        lottieView.setAnimation("data.json");        lottieView.setRepeatCount(-1);        lottieView.setRepeatMode(LottieDrawable.RESTART);        lottieView.playAnimation();        lottieView.pauseAnimation();        lottieView.cancelAnimation();        lottieView.getProgress();

Lottie资源下载
https://lottiefiles.com/

更多相关文章

  1. android图片闪烁或帧动画
  2. Android 动画ObjectAnimator中height和translationY
  3. Android资源收集
  4. Android 不能使用内部资源
  5. Android 视图动画(View Animation) 使用详解
  6. 阿里Android开发规范:资源文件命名与使用规范

随机推荐

  1. Android: MediaScanner生成thumbnail的算
  2. android练习一之简易浏览器
  3. androdi 9.0 P版本 CTS 常见问题表格
  4. API 25 (Android(安卓)7.1.1 API) widget
  5. Android(安卓)Init Language
  6. android中的多媒体应用camera
  7. Android之SurfaceView学习一
  8. Exploring the world of Android
  9. Android(安卓)adb error: “device not f
  10. android 唤醒屏幕并解锁