Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/232.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
带有recyclerview的Android可滚动布局 我正在用两个回收视图进行布局,中间有一个文本视图。现在,我希望整个布局是可滚动的,我现在是一个文本视图卡在中间,布局不可滚动,我试图包装他们的ScLabVIEW,但没有工作,仍然是相同的行为。 如何使整个布局可滚动 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"> <android.support.v7.widget.RecyclerView android:id="@+id/today_booking_recycler_view" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="#e8d6b6" > </android.support.v7.widget.RecyclerView> <RelativeLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@id/today_booking_recycler_view" android:id="@+id/tvRelativeLayout" > <TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:text="seperator" android:textColor="#FF0000" android:padding="@dimen/activity_horizontal_margin" /> </RelativeLayout> <android.support.v7.widget.RecyclerView android:id="@+id/my_booking_recycler_view" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@id/tvRelativeLayout" > </android.support.v7.widget.RecyclerView> </RelativeLayout>_Android_Android Layout_Android Recyclerview - Fatal编程技术网

带有recyclerview的Android可滚动布局 我正在用两个回收视图进行布局,中间有一个文本视图。现在,我希望整个布局是可滚动的,我现在是一个文本视图卡在中间,布局不可滚动,我试图包装他们的ScLabVIEW,但没有工作,仍然是相同的行为。 如何使整个布局可滚动 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"> <android.support.v7.widget.RecyclerView android:id="@+id/today_booking_recycler_view" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="#e8d6b6" > </android.support.v7.widget.RecyclerView> <RelativeLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@id/today_booking_recycler_view" android:id="@+id/tvRelativeLayout" > <TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:text="seperator" android:textColor="#FF0000" android:padding="@dimen/activity_horizontal_margin" /> </RelativeLayout> <android.support.v7.widget.RecyclerView android:id="@+id/my_booking_recycler_view" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@id/tvRelativeLayout" > </android.support.v7.widget.RecyclerView> </RelativeLayout>

带有recyclerview的Android可滚动布局 我正在用两个回收视图进行布局,中间有一个文本视图。现在,我希望整个布局是可滚动的,我现在是一个文本视图卡在中间,布局不可滚动,我试图包装他们的ScLabVIEW,但没有工作,仍然是相同的行为。 如何使整个布局可滚动 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"> <android.support.v7.widget.RecyclerView android:id="@+id/today_booking_recycler_view" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="#e8d6b6" > </android.support.v7.widget.RecyclerView> <RelativeLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@id/today_booking_recycler_view" android:id="@+id/tvRelativeLayout" > <TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:text="seperator" android:textColor="#FF0000" android:padding="@dimen/activity_horizontal_margin" /> </RelativeLayout> <android.support.v7.widget.RecyclerView android:id="@+id/my_booking_recycler_view" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@id/tvRelativeLayout" > </android.support.v7.widget.RecyclerView> </RelativeLayout>,android,android-layout,android-recyclerview,Android,Android Layout,Android Recyclerview,您可以使用此选项滚动整个布局:- <android.support.v4.widget.NestedScrollView android:layout_width="match_parent" android:layout_height="wrap_content" android:fillViewport="true"> // your layout which has to be scrolled </android.s

您可以使用此选项滚动整个布局:-

<android.support.v4.widget.NestedScrollView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:fillViewport="true">

 // your layout which has to be scrolled

</android.support.v4.widget.NestedScrollView>

//必须滚动的布局

您不能将RecyclerView放在RecyclerView中。我认为您需要使用
NestedScrollView