NestedScrollView嵌套RecycleView,一是会出现只显示一行的情况,二是滑动异常即事件冲突。
RecycleView嵌套RecycleView 会出现当子RecycleView的item高度不一致时会显示不全,并且导致子RecycleView能滚动
把design库和V7库升级到23.2以上,注意加上以下代码
LinearLayoutManager mLinearLayoutManager =
new LinearLayoutManager(
context)
;
mLinearLayoutManager.setSmoothScrollbarEnabled(
true)
;
mLinearLayoutManager.setAutoMeasureEnabled(
true)
;
projectList.setLayoutManager(mLinearLayoutManager)
;
projectList.setHasFixedSize(
true)
;
projectList.setNestedScrollingEnabled(
false)
;
此方法可以实现NestedScrollView嵌套RecycleView再嵌套recycleview之类的多重嵌套
转载请注明原文地址: https://ju.6miu.com/read-39936.html