FLAG_ACTIVITY_CLEAR_TASK | FLAG_ACTIVITY_NEW_TASK

1、FLAG_ACTIVITY_NEW_TASK

2、FLAG_ACTIVITY_CLEAR_TASK

  this flag will cause any existing task that would be associated with the activity to be cleared before the activity is started. That is, the activity becomes the new root of an otherwise empty task, and any old activities are finished. 

  这两个结合在一起,相当于清空一个backstack,将新activity置于root。

参考:http://android.xsoftlab.net/reference/android/content/Intent.html#FLAG_ACTIVITY_CLEAR_TASK

posted on
2017-04-21 11:21 
Tekkaman 
阅读(1715
评论(0
编辑 
收藏 
举报

版权声明:本文为tekkaman原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://www.cnblogs.com/tekkaman/p/6742697.html