如何在Android上显示警报对话框?

為{幸葍}努か 提交于 2020-08-05 00:01:11

问题:

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