Create Custom Scroll Bar in Android Wear 2.0

半世苍凉 提交于 2019-12-11 16:25:11

问题


Is there any way to create a WearableRecyclerView with a custom scroll bar in Android Wear 2.0 like this?


回答1:


To create a curved layout for scrollable items in your wearable app check below link:

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

use

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

PS: as for topic question, you dont need app:layout_box just use android:scrollbars="vertical" on your WearableRecyclerView

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



来源:https://stackoverflow.com/questions/47708974/create-custom-scroll-bar-in-android-wear-2-0

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!