设为首页 加入收藏

TOP

关于Android应用设计中多余的“退出”功能
2014-11-24 12:05:05 来源: 作者: 【 】 浏览:1
Tags:关于 Android 应用 设计 多余 退出 功能

其实,我们在Android model的基础上想一下,真得需要这个功能:让用户在任何时候,都能看到一个直接退出该应用的按钮吗?


我认为不需要,同样Google官方人员在很早就表达了这个观点:


Question: Does the user have a choice to kill the application unless we put a menu option in to kill it If no such option exists, how does the user terminate the application


Answert (Romain Guy): The user doesn't, the system handles this automatically. That's what the activity lifecycle (especially onPause/onStop/onDestroy) is for. No matter what you do, do not put a "quit" or "exit" application button. It is useless with Android's application model. This is also contrary to how core applications work.


请参考我的文章--android进程管理机制,那我们就有理由让Android框架(Activity的生命周期)去自动管理应用的生死吧,目前存在的任何一个退出的方法技巧我觉得在过去或未来的某个时候都会出现错误和异常,而无法完成该功能。与Android框架天然相违背的东西,还是不要在menu上出现了吧。


】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇如何降低Android应用程序的耗电量 下一篇Java中断和线程结束深入探讨

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容:

·我的Linux内核学习笔 (2025-12-26 22:21:10)
·如何评价腾讯开源的 (2025-12-26 22:21:07)
·为什么TCP网络编程中 (2025-12-26 22:21:04)
·Python 数据分析与可 (2025-12-26 21:51:20)
·从零开始学Python之 (2025-12-26 21:51:17)