Android-Overview Screen

来源:互联网 发布:保安巡更软件 编辑:程序博客网 时间:2024/04/28 07:33

学会使用Flag对Activity设置,然后可以更好的管理Activity 栈。

With the Android 5.0 release (API level 21), multiple instances of the same activity containing different documents may appear as tasks in the overview screen. 

Using the flags of the Intent class to add a task affords greater control over when and how a document gets opened or reopened in the overview screen. When you use the <activity> attributes you can choose between always opening the document in a new task or reusing an existing task for the document.

Activity:意图标签和Activity属性设置

Using the Intent flag to add a task。

Using the activity attribute to add a task。

 The FLAG_ACTIVITY_NEW_DOCUMENT flag replaces the FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET flag, which is deprecated as of Android 5.0 (API level 21).


0 0