Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法使用关闭应用程序的“强制关闭”按钮构建警报对话框?
谢谢
这取决于您的活动生命周期。如果您总是在开始一个新的活动后完成您的活动,您可以简单地创建一个带有一个按钮的对话框,然后单击该按钮,您只需调用 finish() 就可以了。
一般的“关闭整个应用程序”并不是生命周期应该如何使用。