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