搜尋此網誌

2014年10月10日 星期五

【Android】Intent.FLAG_ACTIVITY_CLEAR_TOP意思

http://developer.android.com/reference/android/content/Intent.html
If set, and the activity being launched is already running in the current task, then instead of launching a new instance of that activity, all of the other activities on top of it will be closed and this Intent will be delivered to the (now on top) old activity as a new Intent.

照字面翻譯,將目前指定activity開啟,如果除指定外其他的activity是開啟的,則會被關閉。若指定的activity是已經開啟的,則不會重新開啟。

參考:
http://iskens.blogspot.tw/2011/01/android-activity.html

沒有留言: