【问题标题】:How to replace SwipeRefreshLayout loading animation with a Lottie animation如何用 Lottie 动画替换 SwipeRefreshLayout 加载动画
【发布时间】:2020-03-05 02:00:09
【问题描述】:

我正在尝试用 Lottie 动画替换 SwipeRefreshLayout 加载动画

我已经浏览了android arsenal 中列出的所有库,它们都不适合我的要求,因为它们没有实现 Lottie 动画并且所有库都有预编码的动画

我也试过这个库,上面写着 "LottieSwipeRefreshLayout" 来自 Github。但它不起作用,因为动画不可见,我不想为这么小的概念使用库,请建议我最好的实现方式。

帮助我完成对我的任务非常重要的工作

【问题讨论】:

    标签: android swiperefreshlayout lottie


    【解决方案1】:

    "LottieSwipeRefreshLayout" 为我解决了问题。主要问题是在您的回收站视图、滚动视图、嵌套滚动视图等中使用属性 app:layout_type="content"。

    还可以在LottiePullToRefreshLayout类中重写的监听器onTriggerListener和onProgressListener中自定义Lottie动画修改

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-07-04
      • 1970-01-01
      • 2018-12-21
      • 1970-01-01
      • 2020-01-01
      • 2020-01-25
      • 2020-08-23
      • 2022-01-24
      相关资源
      最近更新 更多