设为首页 加入收藏

TOP

关于Android应用设计中多余的“退出”功能
2014-11-24 12:05:05 来源: 作者: 【 】 浏览:0
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中断和线程结束深入探讨

评论

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

·Libevent C++ 高并发 (2025-12-26 00:49:30)
·C++ dll 设计接口时 (2025-12-26 00:49:28)
·透彻理解 C 语言指针 (2025-12-26 00:22:52)
·C语言指针详解 (经典 (2025-12-26 00:22:49)
·C 指针 | 菜鸟教程 (2025-12-26 00:22:46)