请参见蓝色矩形中的滚动条:
这是我的代码,我想改变滚动条的长度:
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerViewTeaser"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:scrollbars="horizontal"
android:fadeScrollbars="false"
android:scrollbarThumbHorizontal="@color/orange_color_picker"
android:scrollbarTrackHorizontal="@color/gray"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
1条答案
按热度按时间jbose2ul1#
你可以创建自己的滚动条,并将其与回收视图绑定。以下是回收视图处理上述滚动条的扩展方法
以下是ItemScrollerBinding的xml代码
您可以将其放置在回收器视图下方并使其居中。