- 因为Scrollview和RecyclerView都是滑动控件.会有一点滑动上的冲突.导致滑动起来有些卡顿.这个时候.我们重写一下LayoutManager就行了
- LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getActivity(), LinearLayoutManager.VERTICAL, false) {
- @Override
- public boolean canScrollVertically() {
- return false;
- }
- };
- recyclerview.setLayoutManager(linearLayoutManager);
- recyclerview.setAdapter(tempCommonAdapter);
Scrollview嵌套RecyclerView导致滑动卡顿问题
最新推荐文章于 2024-10-11 18:28:35 发布