FLAG_ACTIVITY_CLEAR_TASK | FLAG_ACTIVITY_NEW_TASK

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

上一篇:stm32f103 rt-thread fal easyflash移植过程


下一篇:imsdroid 学习(初认识)