We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
和 AppBarLayout 一起协作滚动的 兄弟可嵌套滚动的 view,比如 RecyclerView,在 RecyclerView fling 时,但是此时 AppBarLayout 还没滑出屏幕,此时 再去滚动 由于 shouldBlockNestedScroll 已经 为 true 会阻止 AppBarLayout 滚动,所以出现滚动断层现象!
The text was updated successfully, but these errors were encountered:
如何解决
Sorry, something went wrong.
这里有个方案:https://github.com/ckrgithub/CollapsingRefresh
@Override public void onNestedPreScroll(CoordinatorLayout coordinatorLayout, @NonNull AppBarLayout child, View target, int dx, int dy, int[] consumed, int type ) { if (type == TYPE_FLING) { isFlinging = true; } if (!shouldBlockNestedScroll) { super.onNestedPreScroll(coordinatorLayout, child, target, dx, dy, consumed, type); } else if (TYPE_FLING == type) { if (null == consumed) consumed = new int[2]; consumed[1] = dy; } }
加上 else if 这段试试
No branches or pull requests
和 AppBarLayout 一起协作滚动的 兄弟可嵌套滚动的 view,比如 RecyclerView,在 RecyclerView fling 时,但是此时 AppBarLayout 还没滑出屏幕,此时 再去滚动 由于 shouldBlockNestedScroll 已经 为 true 会阻止 AppBarLayout 滚动,所以出现滚动断层现象!
The text was updated successfully, but these errors were encountered: