如何向 android 佩戴操作添加确认对话框?

How do I add a confirmation dialog to an android wear action?

我目前有一个 Android 非常具有破坏性的磨损动作。我怎样才能在执行该操作之前向该操作添加确认对话框。

例如,我在穿戴上有一个动作 "Finish Workout"...一旦用户完成锻炼,他们就无法恢复。我想问问他们'Are you sure you want to finish your workout?'

我该怎么做?

您可以使用 DelayedConfirmationView that is designed to address this, see this tutorial。这将使您的用户有机会 stop/cancel 如果他们决定进行操作。