WearOS app:boxedEdges="all" 隐藏 RecyclerView 中的滚动条

问题描述 投票:0回答:1

有人有解决办法吗?

滚动条可见,无需

boxed edges

<androidx.recyclerview.widget.RecyclerView
        android:id="@+id/recycler_view"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:focusable="true"
        android:focusableInTouchMode="true"
        android:scrollbars="vertical" />

但是一旦我添加了盒装边缘

app:boxedEdges="all"
,滚动条就完全消失了。不知道为什么。有人有解决方法或其他解决方案吗?

这是一个大问题,因为如果可滚动视图(RecyclerView、ScrollView)没有滚动条,WearOS 策略现在会立即拒绝所有应用程序。

android android-recyclerview wear-os
1个回答
0
投票

1 - 尝试使用 WearableRecyclerView 而不是常规的 RecyclerView;

2 - 你真的需要“boxedEdges”吗?如果你这样做,你不能将它添加到容器而不是元素本身吗?或者找到设计的解决方法?

3 - 我不知道它是否会做任何更改,但我喜欢添加“android:orientation=”vertical”参数以及滚动条...

© www.soinside.com 2019 - 2024. All rights reserved.