Git Product home page Git Product logo

Comments (10)

youlookwhat avatar youlookwhat commented on May 31, 2024

我刚看了实现,且认为你指的是下拉刷新的动画,展示动画的条件是:既打开了下拉刷新的开关&实现了下拉刷新的接口,所以显示显示动画时一定会触发Listener。
如果你现在有这个需求,我可以修改一下,实现只显示动画,不触发listener的效果,不过你要自己设置recyclerView.setRefreshing(false);,来关闭动画。你觉得是否是你想要的,如果是的话,我就修改一下。

from byrecyclerview.

qiushui95 avatar qiushui95 commented on May 31, 2024

我只是给你提一下建议,目前还没有接入贵库,还在观望中。还是感谢您的开源。刷新以及加载更多都需要类似的setRefreshingWithoutListener

from byrecyclerview.

youlookwhat avatar youlookwhat commented on May 31, 2024

因为如果可以不设置listener而进行下拉操作,那么使用者会监听不到这个行为,从而就不知道什么时候取消动画,感觉实际意义不大,所以没考虑到这个,实现起来倒不难。
如果你实际真有这个需求,我可以修改这部分的逻辑,因为这样的需求暂时还没遇到。
谢谢你给的建议。

from byrecyclerview.

qiushui95 avatar qiushui95 commented on May 31, 2024

不是手动的进行下拉操作,我已经调用数据请求之后,然后才通知界面显示刷新。因为我的刷新状态全部保存在ViewModel之中,这样不会丢失状态。比如两个Fragment共用一个ViewModel的刷新状态,比如刷新需要5s,A已经进行刷新操作,这时候切换到B页面,就不需要手动刷新触发刷新逻辑,只需要展示刷新动画。

from byrecyclerview.

youlookwhat avatar youlookwhat commented on May 31, 2024

可以,我等下把这部分逻辑完善一下,然后再发布一版👌

from byrecyclerview.

youlookwhat avatar youlookwhat commented on May 31, 2024

感谢提意见,如果对这个架子有兴趣可以Star支持一下😁
这个架子已经运用到我们自己的项目了,我会慢慢完善,之后会推广~

from byrecyclerview.

qiushui95 avatar qiushui95 commented on May 31, 2024

还有,加载更多的逻辑,能否加一个阈值,滑动到倒数第几个就加载,现在应该是最后一个。我想要那种比如倒数第三个就开始加载下一页,这样,用户就会无感知的使用,效果好一点

from byrecyclerview.

youlookwhat avatar youlookwhat commented on May 31, 2024

BRVDH就有这种效果,无感知加载,这个库有一部分是为了区别它存在的,因为设计讲究[所见即所得],看到加载效果后再显示数据。
不过可以考虑这个需求,作为一种配置项也不失为一种选择。

from byrecyclerview.

qiushui95 avatar qiushui95 commented on May 31, 2024

嗯,行

from byrecyclerview.

youlookwhat avatar youlookwhat commented on May 31, 2024

@qiushui95 【支持只显示动画,不触发listener 】已加入,只需要打开下拉刷新开关即可mRecyclerView.setRefreshEnabled(true);

from byrecyclerview.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.