回收器查看过度滚动模式



我使用窗口管理器添加一个回收器视图。在 xml 文件中,我将回收器视图过度滚动模式设置为从不。 我希望滚动条显示。代码如下。

<android.support.v7.widget.RecyclerView
android:id="@+id/expand_list_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="100dp"
android:overScrollMode="never"
android:scrollbarSize="2dp"
android:scrollbarThumbVertical="@color/white"
android:scrollbarTrackVertical="@drawable/expand_list_scroll_bar"
android:scrollbars="vertical"/>

当android:overScrollMode设置从不。滚动条也会消失。我不知道为什么。谁能帮助我?

你可以尝试设置android:fadeScrollbars="false", 然后 回收视图的长度比父布局长

最新更新