简体   繁体   English

如何用 Lottie animation 替换 SwipeRefreshLayout 加载 animation

[英]How to replace SwipeRefreshLayout loading animation with a Lottie animation

I'm trying to replace SwipeRefreshLayout loading animation with a Lottie animation我正在尝试用 Lottie animation 替换 SwipeRefreshLayout 加载 animation

I have gone through all the libraries listed in android arsenal , none of them is feasible for my requirement as they do not implement Lottie animation and all the libraries have pre-coded animation我已经浏览了android库中列出的所有库,它们都不适合我的要求,因为它们没有实现 Lottie animation 并且所有库都预编码了 Z6F1C25ED1523962F1BBF9DEE9BE5092B

I have also tried this library which says "LottieSwipeRefreshLayout" from Github.我也试过这个库,上面写着 Github 的“LottieSwipeRefreshLayout” but it is not working, as the animation is not visible, I do not want to use a library for such a small concept please suggest me the best way to implement.但它不起作用,因为 animation 不可见,我不想为这么小的概念使用库,请建议我最好的实现方法。

Help me like this very much important for my task帮助我喜欢这对我的任务非常重要

"LottieSwipeRefreshLayout" worked out for me. “LottieSwipeRefreshLayout”为我解决了。 the main catch is to use attribute app:layout_type="content" in your recyclerview,scroll view, nested scroll view etc.主要问题是在您的回收站视图、滚动视图、嵌套滚动视图等中使用属性 app:layout_type="content"。

Also to customize the Lottie animation modification can be done in listeners onTriggerListener and onProgressListener which are overridden in LottiePullToRefreshLayout class还可以在 LottiePullToRefreshLayout class 中覆盖的监听器 onTriggerListener 和 onProgressListener 中自定义 Lottie animation 修改

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM