ScrollView嵌套RecycleView解决滑动冲突及卡顿

ScrollView嵌套多层的RecyclerView,造成界面滑动卡顿

    android:id="@+id/linear_martial"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:descendantFocusability="blocksDescendants"
   >
            android:id="@+id/recycler_martial"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:scrollbars="none" />

 recyclerMagicView.setHasFixedSize(true);
recyclerMagicView.setNestedScrollingEnabled(false);

 

LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getActivity(), LinearLayoutManager.VERTICAL, false) {
            @Override
            public boolean canScrollVertically() {
                return false;
            }
        };
recyclerview.setLayoutManager(linearLayoutManager);

 

 

你可能感兴趣的:(ScrollView嵌套RecycleView解决滑动冲突及卡顿)