【发布时间】:2018-01-02 17:10:31
【问题描述】:
我的类从 BottomSheetDialogFragment 扩展,在这个布局中使用 2 个 recyclerViews。但总是 1 个可滚动的 recyclerView 和其他 recyclerView 不起作用。
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/mainCoordinatorLayout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/mainBottomSheet"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<android.support.v7.widget.RecyclerView
android:id="@+id/recyclerViewOne"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1" />
<android.support.v7.widget.RecyclerView
android:id="@+id/recyclerViewTwo"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1" />
</LinearLayout>
</android.support.design.widget.CoordinatorLayout>
【问题讨论】:
-
你想同时滚动两者吗?
-
@Kathi 不,单独滚动
-
但总是 1 个可滚动的 recyclerView 和其他 recyclerView 不起作用。你可以编辑你的问题以更好地理解