Closed JIanyag closed 2 years ago
grid(12) divider { setColor(getColorExt(R.color.colorWhite)) setDivider(10,true) orientation = DividerOrientation.GRID } adapter = mainIndexAdapter 如果BaseRecyclerViewAdapter 是多布局的话,会报数组越界。不支持多布局的Rv吗?
这个类的DefaultDecoration 这个方法中 computeEdge ->is GridLayoutManager 改成
if (layoutManager.orientation == RecyclerView.VERTICAL) { left = spanIndex == 1 right = spanIndex + spanSize - 1 == spanCount top = index <= spanCount && spanGroupIndex == spanSizeLookup.getSpanGroupIndex(position , spanCount) bottom = spanGroupIndex == maxSpanGroupIndex - 1 }
但是横向的有问题 ,横向的最左边和最右边都为0.
grid(12) divider { setColor(getColorExt(R.color.colorWhite)) setDivider(10,true) orientation = DividerOrientation.GRID } adapter = mainIndexAdapter 如果BaseRecyclerViewAdapter 是多布局的话,会报数组越界。不支持多布局的Rv吗?