@@ -42,7 +42,8 @@ parent.link=index.html
4242 <li><a href=#activities_added_to_task_tip>Allow activities to add to current task</a></li>
4343 <li><a href=#notifications_get_back_tip>Notifications and App Widgets should provide consistent back behavior</li>
4444 <li><a href=#use_notification_tip>Use the notification system</a></li>
45- <li><a href=#taking_over_back_key>Don't take over BACK key unless you absolutely need to</a></li>
45+ <li><a href=#taking_over_back_key>Don't take over <em>Back</em> button unless you absolutely
46+ need to</a></li>
4647 </ol>
4748 </li>
4849</ol>
@@ -241,8 +242,8 @@ independent of the other
241242 Android system keeps a linear navigation history of activities the
242243 user has visited. This is the <em>activity stack</em>, also known as the
243244 back stack. In general, when a user starts a new activity, it is added
244- to the activity stack, so that pressing BACK displays the previous
245- activity on the stack. However, the user cannot use the BACK key to go
245+ to the activity stack, so that pressing <em>Back</em> displays the previous
246+ activity on the stack. However, the user cannot use the <em>Back</em> button to go
246247 back further than the last visit to Home. The adding of an activity to
247248 the current stack happens whether or not that activity begins a new
248249 <a href=#tasks title=task>task</a> (as long as that task was started
@@ -256,10 +257,11 @@ independent of the other
256257 Activities are the only things that can be added to the activity stack
257258 — views, windows, menus, and dialogs cannot. That is, when
258259 designing the navigation, if you have screen A and you want the user
259- to be able go to a subsequent screen B and then use the BACK key to go
260+ to be able go to a subsequent screen B and then use the <em>Back</em> button to go
260261 back to screen A, then the screen A needs to be implemented as an
261262 activity. The one exception to this rule is if your application
262- <a href="#taking_over_back_key">takes control of the BACK key</a> and manages the navigation
263+ <a href="#taking_over_back_key">takes control of the <em>Back</em> button</a> and manages the
264+ navigation
263265itself.
264266</p>
265267
@@ -287,7 +289,7 @@ itself.
287289 launcher, Home screen shortcut or "Recent tasks" switcher (a long
288290 press on Home on some devices). The user can return to a task by
289291 choosing the icon for its root activity the same way they started the
290- task. Once inside a task, the BACK key goes to previous activities in
292+ task. Once inside a task, the <em>Back</em> button goes to previous activities in
291293 that task. The activity stack is made up of one or more tasks.
292294</p>
293295
@@ -331,7 +333,7 @@ itself.
331333 Browser are two applications that do this. For example, choosing an
332334 address in an email starts the Maps activity as a new task, and
333335 choosing a link in an email starts the Browser activity as a new
334- task. In these cases, the BACK key will return to the previous
336+ task. In these cases, the <em>Back</em> button will return to the previous
335337 activity in a different task (Email), because it was not started from
336338 Home.
337339</p>
@@ -341,7 +343,7 @@ itself.
341343
342344<p>
343345 The following examples illustrate basic principles for applications,
344- activities, the activity stack, the BACK key , tasks and intents. It
346+ activities, the activity stack, the <em>Back</em> button , tasks and intents. It
345347 shows how the system responds to user actions such as starting
346348 activities and switching between tasks. With most of these examples
347349 you can follow along, launching activities on your device as
@@ -367,19 +369,20 @@ itself.
367369 <img src={@docRoot}images/activity_task_design/HomeTaskBasics1a.png>
368370</p>
369371
370- <h3 id=navigating_away_from_an_activity>Navigating Away from an Activity with BACK and HOME keys</h3>
372+ <h3 id=navigating_away_from_an_activity>Navigating Away from an Activity with <em>Back</em> and
373+ <em>Home</em> buttons</h3>
371374
372375<p>
373376 An activity can keep or lose its state depending on how the user
374- leaves the activity — by the HOME or BACK key .
377+ leaves the activity — by the <em>Home</em> or <em>Back</em> button .
375378</p>
376379
377380<p>
378- By default, pressing the BACK key finishes (destroys) the current
381+ By default, pressing the <em>Back</em> button finishes (destroys) the current
379382 activity and displays the previous activity to the user. In the
380383 following figure, the user starts email by touching the Email icon in
381384 the Home screen, which displays a list of email messages. The user
382- scrolls down the list (changing its initial state). Pressing BACK
385+ scrolls down the list (changing its initial state). Pressing <em>Back</em>
383386 destroys the List Messages activity and returns to the previous
384387 activity, which is Home. If the user re-launches Email, it would
385388 re-load the messages and display its initial, non-scrolled state.
@@ -390,15 +393,15 @@ itself.
390393</p>
391394
392395<p>
393- In the above example, pressing BACK goes to Home because it was the
396+ In the above example, pressing <em>Back</em> goes to Home because it was the
394397 last activity the user was viewing. But if the user had gotten to List
395- Message from some other activity, then pressing BACK would have
398+ Message from some other activity, then pressing <em>Back</em> would have
396399 returned there.
397400</p>
398401
399402<p>
400403 By contrast, the next figure shows the user leaving List Messages by
401- pressing HOME instead of BACK — the List Messages activity is
404+ pressing <em>Home</em> instead of <em>Back</em> — the List Messages activity is
402405 stopped and moved to the background rather than being
403406 destroyed. Starting Email again from its icon would simply bring the
404407 List Messages activity to the foreground (changing it from stopped to
@@ -423,8 +426,8 @@ itself.
423426
424427<p>
425428 In addition, not all activities have the behavior that they are
426- destroyed when BACK is pressed. When the user starts playing music in
427- the Music application and then presses BACK , the application overrides
429+ destroyed when <em>Back</em> is pressed. When the user starts playing music in
430+ the Music application and then presses <em>Back</em> , the application overrides
428431 the normal back behavior, preventing the player activity from being
429432 destroyed, and continues playing music, even though its activity is no
430433 longer visible — as a visual substitute, the Music application
@@ -451,7 +454,7 @@ itself.
451454 activity to get a picture. This is a good example of re-use of the
452455 Gallery activity. The following figure illustrates the sequence of
453456 activities to do this (up to crop). This is how it's done: The user
454- chooses Contacts, selects the contact for viewing, chooses MENU >
457+ chooses Contacts, selects the contact for viewing, chooses <em>Menu</em> >
455458 Edit contact and touches the picture field, which launches the Gallery
456459 activity. The user then chooses the picture they want, crops and saves
457460 it. Saving it causes the picture to be inserted into the picture field
@@ -484,12 +487,12 @@ itself.
484487 <b>Gallery Re-Uses Messaging for Sharing a Picture</b> - Sharing is
485488 another good example of one application re-using an activity from a
486489 different application. As shown in the following figure, the user
487- starts Gallery, picks a picture to view, chooses MENU > Share, and
490+ starts Gallery, picks a picture to view, chooses <em>Menu</em> > Share, and
488491 picks "Messaging". This starts the Messaging activity, creates a new
489492 message and attaches the original picture to it. The user then fills
490493 in the "To" field, writes a short message and sends it. User focus
491494 remains in the Messaging program. If the user wants to go back to the
492- Gallery, they must press the BACK key . (The user can back up through
495+ Gallery, they must press the <em>Back</em> button . (The user can back up through
493496 each activity all the way to Home.)
494497</p>
495498
@@ -552,7 +555,7 @@ itself.
552555 <ul>
553556 <li>
554557 State 2 - The user wants to do something else while they're
555- waiting, so they press HOME , which does not interrupt the map's
558+ waiting, so they press <em>Home</em> , which does not interrupt the map's
556559 network connection and allows the map to continue loading in the
557560 background.
558561
@@ -729,7 +732,7 @@ href="{@docRoot}guide/topics/intents/intents-filters.html">Intents and Intent Fi
729732 <b>Start first task.</b> You want to send a text message and attach a photo. You would choose:
730733
731734 <p>
732- Home > Messaging > New message > MENU > Attach
735+ Home > Messaging > New message > <em>Menu</em> > Attach
733736 > Pictures. This last step launches the picture gallery
734737 for picking a photo. Notice that picture gallery is an
735738 activity in a separate application.
@@ -961,7 +964,7 @@ MAIN and
961964 address in an email message (or web page), where the Maps
962965 activity is started to map the location. No result from maps
963966 is expected to be returned to the email message; the user
964- can return by pressing the BACK key . (Such an activity is
967+ can return by pressing the <em>Back</em> button . (Such an activity is
965968 started with {@link
966969 android.content.Context#startActivity(android.content.Intent)
967970 startActivity()}.)
@@ -1102,20 +1105,21 @@ MAIN and
11021105 convenience to respond to your message.
11031106</p>
11041107
1105- <h3 id=taking_over_back_key>Don't take over the BACK key unless you absolutely need to</h3>
1108+ <h3 id=taking_over_back_key>Don't take over the <em>Back</em> button unless you absolutely need
1109+ to</h3>
11061110
11071111<p>
11081112 As a user navigates from one activity to the next, the system adds
11091113 them to the activity stack. This forms a navigation history that is
1110- accessible with the BACK key . Most activities are relatively limited
1114+ accessible with the <em>Back</em> button . Most activities are relatively limited
11111115 in scope, with just one set of data, such as viewing a list of
11121116 contacts, composing an email, or taking a photo. But what if your
11131117 application is one big activity with several pages of content and
1114- needs finer-grained control of the BACK key ? Examples of such Google
1118+ needs finer-grained control of the <em>Back</em> button ? Examples of such Google
11151119 applications are the Browser, which can have several web pages open
11161120 at once, and Maps, which can have several layers of geographic data
11171121 to switch between. Both of these applications take control of the
1118- BACK key and maintain their own internal back stacks that operate
1122+ <em>Back</em> button and maintain their own internal back stacks that operate
11191123 only when these applications have focus.
11201124</p>
11211125
@@ -1124,7 +1128,7 @@ MAIN and
11241128 information on a map to the user: displaying the location of a
11251129 search result, displaying locations of friends, and displaying a
11261130 line for a street path providing direction between points. Maps
1127- stores these layers in its own history so the BACK key can return to
1131+ stores these layers in its own history so the <em>Back</em> button can return to
11281132 a previous layer.
11291133</p>
11301134
@@ -1135,8 +1139,8 @@ MAIN and
11351139 as Windows, Macintosh or Linux). For example, if you did a Google
11361140 web search in one window of the Android Browser, clicking on a link
11371141 in the search results displays a web page in that same window, and
1138- then pressing BACK would to the search results page. Pressing
1139- BACK goes to a previous window only if the current window was
1142+ then pressing <em>Back</em> would to the search results page. Pressing
1143+ <em>Back</em> goes to a previous window only if the current window was
11401144 launched from that previous window. If the user keeps pressing
11411145 back, they will eventually leave the browser activity and return
11421146 Home.
0 commit comments