canyinghao / CanRefresh

可适配所有视图的下拉刷新上拉加载,并支持各种风格。
Apache License 2.0
350 stars 82 forks source link

跟CoordinatorLayout一起用的时候滑动冲突 #9

Closed lewiswon closed 7 years ago

lewiswon commented 7 years ago

当Toolbar设置了layout_scrollFlags="scroll|enterAlways",刚开始向下滑动的时候会有卡顿,但是滑过header的高度后就正常了

canyinghao commented 7 years ago

确实有这问题,暂时没能解决。

lewiswon commented 7 years ago

是否跟behavior有关系?

canyinghao commented 7 years ago

应该是吧,我暂时也没时间弄。你可以试着修复一下。

lewiswon commented 7 years ago

我监听了AppBarLayout的offset change,在offset!=0的时候,让canChildScrollUp返回true,暂时解决了这个问题,我看到你项目中也有相关的代码,但是好像只适用于CanRefreshLayout作为CoordinatorLayout的父布局。

canyinghao commented 7 years ago

嗯,我只是让CoordinatorLayout作为子视图时可刷新。