带有RecyclerView的Android BottomSheet

use*_*944 6 android android-recyclerview bottom-sheet

我在其中添加了一个带有RecyclerView的BottomSheet,但是我无法滚动RecyclerView,也无法找出问题所在。

这是我的BottomSheet:

   <!-- bottom sheet -->
<FrameLayout
   android:id="@+id/bottom_sheet"
   style="@style/Widget.Design.BottomSheet.Modal"
   android:layout_width="match_parent"
   android:layout_height="0dp"
   app:behavior_hideable="true"
   app:behavior_peekHeight="90dp"
   app:layout_behavior="@string/bottom_sheet_behavior">

    <!-- horizontal thumbnail -->
    <android.support.v7.widget.RecyclerView
       android:id="@+id/horizontal_thumbnail"
       android:layout_width="match_parent"
       android:layout_height="90dp"/>

    <!-- vertical thumbnail -->
    <android.support.v7.widget.RecyclerView
       android:id="@+id/vertical_thumbnail"
       android:layout_width="match_parent"
       android:layout_height="match_parent"
       android:visibility="gone"/>
</FrameLayout>
Run Code Online (Sandbox Code Playgroud)

展开工作表时,垂直缩略图可见;折叠列表时,水平缩略图可见。

use*_*944 1

解决了。问题是我向 BottomSheet 添加了两个 RecyclerView,而第二个在这种情况下没有滚动。我真的不需要第一个,当我删除它时,我可以滚动另一个。