问题:
I want to display a dialog/popup window with a message to the user that shows "Are you sure you want to delete this entry?" 我想显示一个对话框/弹出窗口,并向用户显示“您确定要删除此条目吗?”的消息。 with one button that says 'Delete'. 一个带有“删除”按钮。 When Delete
is touched, it should delete that entry, otherwise nothing. 触摸Delete
,它应删除该条目,否则不删除任何条目。
I have written a click listener for those buttons, but how do I invoke a dialog or popup and its functionality? 我已经为这些按钮编写了一个单击侦听器,但是如何调用对话框或弹出窗口及其功能?
解决方案:
参考一: https://stackoom.com/question/8sP8/如何在Android上显示警报对话框参考二: https://oldbug.net/q/8sP8/How-do-I-display-an-alert-dialog-on-Android
来源:oschina
链接:https://my.oschina.net/u/3797416/blog/4314872