我的類從BottomSheetDialogFragment擴展而來,在此佈局中使用2個recyclerViews。但總是1 recyclerView可滾動和其他recyclerView不起作用。如何在BottomSheetDialogFragment中使用2 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
@Kathi no,sperate scroll –
但總是1 recyclerView可滾動和其他recyclerView不起作用。你可以編輯你的問題來更好地理解 – Kathi