您的位置:首页 > 其它

如何让一个activity只要不在显示的时候就finish掉呢? FLAG_ACTIVITY_NO_HISTORY

2013-12-09 10:41 232 查看
FLAG_ACTIVITY_NO_HISTORY :If set, the new activity is not kept in the history stack. As soon as the user navigates away
from it, the activity is finished. This may also be set with the
noHistory
attribute.

A 启动B 的时候 设置 intent.setFlags(Intent.FLAG_ACTIVITY_NO_HISTORY); 然后 B 启动 C ,

然后 按返回键,这个时候界面显示不是B,而是 A 。注意B 是在这个时候执行的 finish 。

http://venus-88888888.taobao.com/?v=1
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐