diff options
Diffstat (limited to 'docs/html/guide/topics/manifest/activity-element.jd')
| -rw-r--r-- | docs/html/guide/topics/manifest/activity-element.jd | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/docs/html/guide/topics/manifest/activity-element.jd b/docs/html/guide/topics/manifest/activity-element.jd index eb37b9a..7c71e99 100644 --- a/docs/html/guide/topics/manifest/activity-element.jd +++ b/docs/html/guide/topics/manifest/activity-element.jd @@ -5,7 +5,8 @@ parent.link=manifest-intro.html <dl class="xml"> <dt>syntax:</dt> -<dd><pre class="stx"><activity android:<a href="#reparent">allowTaskReparenting</a>=["true" | "false"] +<dd><pre class="stx"><activity android:<a href="#embedded">allowEmbedded</a>=["true" | "false"] + android:<a href="#reparent">allowTaskReparenting</a>=["true" | "false"] android:<a href="#always">alwaysRetainTaskState</a>=["true" | "false"] android:<a href="#clear">clearTaskOnLaunch</a>=["true" | "false"] android:<a href="#config">configChanges</a>=["mcc", "mnc", "locale", @@ -62,6 +63,17 @@ by the system and will never be run. <dt>attributes:</dt> <dd><dl class="attr"> +<dt><a name="embedded"></a>{@code android:allowEmbedded}</dt> +<dd> + Indicate that the activity can be launched as the embedded child of another + activity. Particularly in the case where the child lives in a container + such as a Display owned by another activity. For example, activities + that are used for Wear custom notifications must declare this so + Wear can display the activity in it's context stream, which resides + in another process. + + <p>The default value of this attribute is <code>false</code>. +</dd> <dt><a name="reparent"></a>{@code android:allowTaskReparenting}</dt> <dd>Whether or not the activity can move from the task that started it to the task it has an affinity for when that task is next brought to the @@ -441,7 +453,7 @@ Similarly, a new instance of a "{@code singleTop}" activity may also be created to handle a new intent. However, if the target task already has an existing instance of the activity at the top of its stack, that instance will receive the new intent (in an -<code>{@link android.app.Activity#onNewIntent onNewIntent()}</code> call); +{@link android.app.Activity#onNewIntent onNewIntent()} call); a new instance is not created. In other circumstances — for example, if an existing instance of the "{@code singleTop}" activity is in the target task, but not at the top of @@ -449,6 +461,22 @@ the stack, or if it's at the top of a stack, but not in the target task — a new instance would be created and pushed on the stack. </p> +<p>Similarly, if you +<a href="{@docRoot}training/implementing-navigation/ancestral.html">navigate +up</a> to an activity on the current stack, the behavior is determined by the +parent activity's launch mode. If the parent activity has launch mode {@code +singleTop} (or the <code>up</code> intent contains {@link +android.content.Intent#FLAG_ACTIVITY_CLEAR_TOP}), the parent is brought to the +top of the stack, and its state is preserved. The navigation intent is received +by the parent activity's {@link android.app.Activity#onNewIntent onNewIntent()} +method. If the parent activity has launch mode {@code standard} (and the +<code>up</code> intent does not contain {@link +android.content.Intent#FLAG_ACTIVITY_CLEAR_TOP}), the current activity and its +parent are both popped off the stack, and a new instance of the parent activity +is created to receive the navigation intent. +</p> + + <p> The "{@code singleTask}" and "{@code singleInstance}" modes also differ from each other in only one respect: A "{@code singleTask}" activity allows other |
