diff options
author | Andrew Solovay <asolovay@google.com> | 2014-07-10 13:23:45 -0700 |
---|---|---|
committer | Andrew Solovay <asolovay@google.com> | 2014-07-11 17:28:42 -0700 |
commit | 4d06d970526b58ddaf8db89858615217fa88772b (patch) | |
tree | 266de2750342cf9cbf773c9ea2cc749c7dc106b8 /docs/html/training/implementing-navigation | |
parent | 0cb38d2e5ab32fd34c8129f3c2d1c158bad9abc3 (diff) | |
download | frameworks_base-4d06d970526b58ddaf8db89858615217fa88772b.zip frameworks_base-4d06d970526b58ddaf8db89858615217fa88772b.tar.gz frameworks_base-4d06d970526b58ddaf8db89858615217fa88772b.tar.bz2 |
docs: Noted how singleTop affects "up" navigation.
Docs are staged to:
http://asolovay.mtv:9411/training/implementing-navigation/ancestral.html#NavigateUp
http://asolovay.mtv:9411/guide/topics/manifest/activity-element.html#lmode
bug: 14527411
Change-Id: Ia414f2206339fc33739c8244f14140dd2e5d1607
Diffstat (limited to 'docs/html/training/implementing-navigation')
-rw-r--r-- | docs/html/training/implementing-navigation/ancestral.jd | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/docs/html/training/implementing-navigation/ancestral.jd b/docs/html/training/implementing-navigation/ancestral.jd index 12d5005..f4d7c1a 100644 --- a/docs/html/training/implementing-navigation/ancestral.jd +++ b/docs/html/training/implementing-navigation/ancestral.jd @@ -133,7 +133,25 @@ android.support.v4.app.NavUtils} class's static method, navigateUpFromSameTask()}. When you call this method, it finishes the current activity and starts (or resumes) the appropriate parent activity. If the target parent activity is in the task's back stack, it is brought -forward as defined by {@link android.content.Intent#FLAG_ACTIVITY_CLEAR_TOP}.</p> +forward. The way it is brought forward depends on whether the parent activity +is able to handle an {@link +android.app.Activity#onNewIntent onNewIntent()} call:</p> + +<ul> + <li>If the parent activity has launch mode <a + href="{@docRoot}guide/topics/manifest/activity-element.html#lmode">{@code + <singleTop>}</a>, or the <code>up</code> intent contains {@link + android.content.Intent#FLAG_ACTIVITY_CLEAR_TOP}, the parent activity is + brought to the top of the stack, and receives the intent through its + {@link android.app.Activity#onNewIntent onNewIntent()} method.</li> + + <li>If the parent activity has launch mode <a + href="{@docRoot}guide/topics/manifest/activity-element.html#lmode">{@code + <standard>}</a>, and the <code>up</code> intent does not contain + {@link android.content.Intent#FLAG_ACTIVITY_CLEAR_TOP}, the parent activity + is popped off the stack, and a new instance of that activity is created on + top of the stack to receive the intent.</li> +</ul> <p>For example:</p> @@ -157,7 +175,6 @@ activity was started in a task that belongs to a different app, then navigating <em>Up</em> should create a new task that belongs to your app, which requires that you create a new back stack.</p> - <h3 id="BuildBackStack">Navigate up with a new back stack</h3> <p>If your activity provides any <a |