NestedRecyclerView icon indicating copy to clipboard operation
NestedRecyclerView copied to clipboard

外层再嵌套一层CoordinatorLayout,实现收缩布局,子RecyclerView的fling完成后就会直接导致收缩布局展开,有解决方案吗?我试了几种方式都没法完全解决问题

Open alferd0806 opened this issue 5 years ago • 1 comments

alferd0806 avatar Dec 23 '20 03:12 alferd0806

禁用掉ChildRecyclerView的startNestedScroll(int axes, int type)就可以了,之前想得复杂了还改了好久,直接在type=TYPE_NON_TOUCH的时候,也就是fling状态中的就直接返回false override fun startNestedScroll(axes: Int, type: Int): Boolean { if (type == ViewCompat.TYPE_NON_TOUCH) { return false } return super.startNestedScroll(axes, type) }

alferd0806 avatar Dec 23 '20 05:12 alferd0806