开发者

Android Alert Dialog Force Close

开发者 https://www.devze.com 2022-12-21 08:20 出处:网络
Is there any way to build an Alert Dialog with a Button \"Force Close\" that close the app? Than开发者_如何学编程ksThat depends on you activity life cycle.

Is there any way to build an Alert Dialog with a Button "Force Close" that close the app?

Than开发者_如何学编程ks


That depends on you activity life cycle. If you always finish your activities after starting a new one, you can simply create a dialog with one button and on click of the button, you simply call finish() and thats it.

A general "close the whole application" is not how the life cycle should be used.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号