我有一个 RecyclerView
,希望在滚动条覆盖多个页面时显示滚动条。
我根本没有滚动条。有什么想法吗?
我的布局:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<CheckBox
android:id="@+id/cl_only_empty"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:elevation="5dp"
android:text="@string/cl_only_empty"
android:textColor="@color/white" />
<android.support.v7.widget.RecyclerView
android:id="@+id/callsList"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbars="vertical" />
</LinearLayout>
最佳答案
解决方法是在xml布局中设置垂直(或水平)滚动条:
<android.support.v7.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbars="vertical" />
关于android - 滚动条未在 RecyclerView 中显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27376224/