JasonGaoH/NestedRecyclerView

【解决办法】从子列表向上滑动时,会出现子列表未滑动到顶部的情况

cmconan opened this issue · 0 comments

感谢作者的代码!
提个修改建议: ParentRecyclerView中
public boolean canScrollVertically() { ChildRecyclerView childRecyclerView = findNestedScrollingChildRecyclerView(); return (canScrollVertically.get() || childRecyclerView == null || childRecyclerView.isScrollTop()); }
这里上滑时,没有判断子列表未滑动到顶部的情况,改成下面这种方式就OK了
public boolean canScrollVertically() { ChildRecyclerView childRecyclerView = findNestedScrollingChildRecyclerView(); if (childRecyclerView != null && !childRecyclerView.isScrollTop()) { return false; } else { return canScrollVertically.get(); } }