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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM