liaoinstan / SpringView

🔥 A custom view pull to refresh,support ScrollView,ListView,RecyclerView,WebView and all another views, easy to use
Apache License 2.0
1.93k stars 355 forks source link

不能设置阻尼系数,下拉感觉费劲,像美团 饿了么 现在下拉都比较轻松,建议增加设置阻尼系数功能 #64

Open yuanmenghao opened 6 years ago

liaoinstan commented 6 years ago

下次更新会新增一个接口,如果现在就要使用的话,可以下载源码修改下面这个常量: private final double MOVE_PARA = 2; //移动参数:计算手指移动量的时候会用到这个值,值越大,移动量越小,若值为1则手指移动多少就滑动多少px

yuanmenghao commented 6 years ago

还有一个问题,我用scrollview嵌套gridview、listview、banner。 这个时候滑动会有冲突,下拉会在屏幕的大片区域失效。

liaoinstan commented 6 years ago

因为你用scrollview嵌套gridview、listview3个可滚动view本身就存在手势冲突,SpringView只关心内部的第一个view,不关心这个view里面嵌套的其他view,你处理好scrollview嵌套gridview、listview带来的手势冲突就行了。 一般这类的嵌套问题: 推荐使用NestedScrollView嵌套2个RecyclerView(gridview、listview都用RecyclerView实现),给两个RecyclerView设置不级联滚动就行了: recycleView.setNestedScrollingEnabled(false);

yuanmenghao commented 6 years ago

但是我已经把scrollview 和gridview、listview的冲突解决过了。你说的我都明白,我猜嵌套recyclerview应该是没问题的。我想问的是,springview的第一个子view就是scrollview,而scrollview本身是已经解决过冲突的,为什么还会出现冲突,是我的代码问题么。 因为这个布局是上个人写的,好久了,而且比较复杂,不想重写所以这么问。

liaoinstan commented 6 years ago

有空我按这样嵌套建个demo试试

yuanmenghao commented 6 years ago

你确定nestedscrollview 嵌套俩recyclerview 用springview 可以用吧,那我就按照这个方式先写了。

yuanmenghao commented 6 years ago

我之前一直是 recyclerview嵌套recyclerview 用header 反正是挺好用

liaoinstan commented 6 years ago

nestedscrollview+recyclerview +springview 这种方式我是经常用,即便是很复杂的布局也很容易排列

yuanmenghao commented 6 years ago

好的。之前没用过nestedscrollview,顺带问一下,阿里的Vlayout 可以用么

liaoinstan commented 6 years ago

可以,Vlayout 本身也是recyclerview 只是封装了一下adapter

yuanmenghao commented 6 years ago

好的,谢谢。

uty3714 commented 6 years ago

什么时候更新 下啦阻尼?