如何知道"不保留活动"在ICS被启用? [英] How to know "Don't keep activities" is enabled in ICS?

查看:139
本文介绍了如何知道"不保留活动"在ICS被启用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何知道设置不保留活动选项中通过code芯片启用。如果在启用了如何prevent活性

How to know in settings "Don't keep activities" option is enabled in ics via code. If it is in enabled,how to prevent the activity.

注:我使用了更多的活动,我application.Because那设置,如果我移动一个活动到另一个活动的第一个活动是destroyed.I可以节省上的onSaveInstanceState我的数据。由于使用了保存实例状态有没有办法做到......

Note: I have used more activities in my application.Because of that settings if I move one activity to another the first activity is destroyed.I can save my data on the onSaveInstanceState. With out using saved instance state is there any way to do...

在此先感谢。

推荐答案

这标志是有正是这个原因。这样做是为了检查并确保您的应用程序处理的活动遭到破坏。你不能覆盖它,因为在现实生活中,可能如果设备内存不足,甚至发生没有该标志。您需要code事情要处理,这种情况下不覆盖它。

That flag is there for exactly this reason. The idea is to check and make sure your app handles its activities being destroyed. You can't override it because in the real world it might happen even without that flag if the device is low on memory. You need to code things to handle this case not override it.

这篇关于如何知道"不保留活动"在ICS被启用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆