intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT)[size=medium]解释:Intent.FLAG_ACTIVITY_REORDER_TO_FRONT的意思是,如果task中已经有这个activity A,那么就把A拿到task的最顶层,而不是创建一个新的activity。所以不加flag也不会影响界面的切过去,只是会影响task的顺序而已。[/size]
[quote]android sdk document 原文:
If set in an Intent passed to Context.startActivity(), this flag will cause the launched activity to be brought to the front of its task's history stack if it is already running.[/quote]
[url]http://androidappdocs.appspot.com/reference/android/content/Intent.html[/url]
intent.addFlags(Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY);解释:
本文详细解释了Android中Intent.FLAG_ACTIVITY_REORDER_TO_FRONT和Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY两个标志位的作用。前者使得已存在的Activity被提升到历史堆栈的顶部,而不会创建新的实例;后者则表明Activity是从历史记录中启动的。
2104

被折叠的 条评论
为什么被折叠?



