Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

快速滑动到第二页,过程不停,继续滑第二页只有一页? #17

Open
zhuzhushang opened this issue May 5, 2017 · 3 comments

Comments

@zhuzhushang
Copy link

zhuzhushang commented May 5, 2017

有个bug,快速滑动到第二页,过程不停,继续滑第二页,可以看到第二页只有一屏,
第三次滑动第二页时,才是正常的。
(可以简单理解为 第二页第一次滑动,滑不下去,需要第二次滑动才能滑下去)
可以肯定是作者提供的代码的bug,并不是我引用有问题。

@775311653
Copy link

我也是,要滑第二次才能正常到第二页

@hjm1fb
Copy link

hjm1fb commented Apr 10, 2018

我的解决方案:把PageBehavior类onNestedScroll方法的最后的 if 代码
if (dependentView.get().getTranslationY() > -dependentView.get().getHeight() && dyConsumed > 0) { mode = 1; ((Page) child).setScrollAble(false, dependentView.get().getTranslationY()); }
删掉就好了

@wangwu59105
Copy link

把PageBehavior里面过时的方法替换掉,会多个参数,入参里面会多个type。onNestedScroll onStopNestedScroll,
@OverRide
public void onStopNestedScroll(@nonnull CoordinatorLayout coordinatorLayout, @nonnull View child, @nonnull View target, int type) {
super.onStopNestedScroll(coordinatorLayout, child, target, type);
//两个方法里面都加上
if(type != ViewCompat.TYPE_TOUCH){
return;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants