我想将NestedScrollView放在RecylerView内。我将NestedScrollView放在一个ViewHolder中.NestedScrollView无法正常工作。帮帮我。
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/mainLayout"
android:clickable="true"
android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/white">
<android.support.v7.widget.RecyclerView
android:id="@+id/lstAddEditCustomObj"
android:layout_width="match_parent"
android:layout_height="match_parent">
</android.support.v7.widget.RecyclerView>
</RelativeLayout>
这是我的视图架布局
<LinearLayout
android:layout_width="match_parent"
android:layout_height="150dp"
android:background="@drawable/gray_stroke"
android:orientation="vertical">
<android.support.v4.widget.NestedScrollView
android:id="@+id/nestedScroll"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"
android:scrollbars="none"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<LinearLayout
android:id="@+id/fromContactList"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
</LinearLayout>