gpt4 book ai didi

android - 滚动条未在 RecyclerView 中显示

转载 作者:IT老高 更新时间:2023-10-28 21:37:04 27 4
gpt4 key购买 nike

我有一个 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/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com