NestedScrollView滚动与recyclerview

acn*_*www 11 android scrollview android-recyclerview

RecyclerView在a中布局了一个NestedScrollView并且我想要NestedScrollView滚动RecyclerView,但这只发生在recyclerView到达结尾时,下面是我的布局代码:

<android.support.v4.widget.NestedScrollView
android:id="@+id/lists_frame"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:animateLayoutChanges="true"
tools:context="com.example.niuky.design.MainActivity4"
>
    <LinearLayout
   android:layout_width="match_parent"
   android:layout_height="match_parent"
   android:orientation="vertical"
   >
    <View
       android:id="@+id/header"
       android:layout_width="match_parent"
       android:layout_height="256dp"
       android:background="@color/material_blue_grey_800"
       />

   <View
       android:id="@+id/tabs"
       android:layout_width="match_parent"
       android:layout_height="?android:attr/actionBarSize"
       android:background="@color/material_blue_grey_950"
       />

  <android.support.v7.widget.RecyclerView
      android:id="@+id/recyclerview2"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:minHeight="700dp"

      />
   </LinearLayout>
</android.support.v4.widget.NestedScrollView>
Run Code Online (Sandbox Code Playgroud)

这是我的运行时视图: RecycteredView在NestedScrollView中

小智 1

在 RecyclerView 上android:nestedScrollingEnabled="false"