在Android Wear 2.0中创建自定义滚动条

时间:2017-12-08 06:36:11

标签: android android-wear-2.0

有没有办法在Android Wear 2.0中使用自定义滚动条创建WearableRecyclerView?

enter image description here

1 个答案:

答案 0 :(得分:0)

要为可穿戴应用中的可滚动项目创建弯曲布局,请检查以下链接:

https://developer.android.com/training/wearables/ui/lists.html#creating

使用

val layoutManager = CurvedChildLayoutManager(this) recyclerView.layoutManager = layoutManager

PS:至于主题问题,你不需要app:layout_box只需在你的WearableRecyclerView上使用android:scrollbars =“vertical”

https://developer.android.com/reference/android/support/wearable/view/CurvedChildLayoutManager.html