WearableListView :逐一添加元素

WearableListView : add elements 1 by 1

查看文档 (https://developer.android.com/training/wearables/ui/lists.html) 后,我注意到您需要为适配器提供一个字符串数组。有没有办法使用 arrayList 以便我可以在发生的事件上动态添加项目?

WearableListView 扩展了 RecyclerView,因此所有常用的东西也适用于此;您可以添加数据,然后通过调用 notifyDataSetChanged() 通知适配器数据集已更改;在这里管理数据没有魔法。