2016-11-24 47 views
3

我添加了一个带有RecyclerView的BottomSheet到我的应用程序,但我无法滚动RecyclerView,我找不到问题所在。Android底部附带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> 

垂直缩略图是可见的,当薄片扩张,当列表处于折叠状态的水平是可见的。

回答

0

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