Skip to content

Commit a9d9fa7

Browse files
scottamainAndroid (Google) Code Review
authored andcommitted
Merge "docs: switch from caps to initial-case for device button names" into ics-mr1
2 parents 4ba15ef + cf9fe43 commit a9d9fa7

File tree

15 files changed

+170
-99
lines changed

15 files changed

+170
-99
lines changed

docs/html/guide/practices/tablets-and-handsets.jd

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,8 @@ side.</p>
9999

100100
<p>You can enable items from the options menu to appear directly in the action bar as "action
101101
items". You can also add navigation features to the action bar, such as tabs or a drop-down list,
102-
and use the application icon to supplement the system's BACK behavior with the option to navigate to
102+
and use the application icon to supplement the system's <em>Back</em> button behavior with the option to
103+
navigate to
103104
your application's "home" activity or "up" the application's structural hierarchy.</p>
104105

105106
<p>This guide provides some tips for using the action bar in ways that support both tablets and
@@ -458,7 +459,8 @@ attribute.</p>
458459
developer guide, you can use the application icon in the action bar to facilitate user navigation
459460
when appropriate&mdash;either as a method to get back to the "home" activity (similar to clicking
460461
the logo on a web site) or as a way to navigate up the application's structural hierarchy. Although
461-
it might seem similar to the standard BACK navigation in some cases, the up navigation option
462+
it might seem similar to the standard <em>Back</em> navigation in some cases, the up navigation
463+
option
462464
provides a more predictable navigation method for situations in which the user may have entered
463465
from an external location, such as a notification, app widget, or a different application.</p>
464466

docs/html/guide/practices/ui_guidelines/activity_task_design.jd

Lines changed: 34 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -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
&mdash; 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
263265
itself.
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 &mdash; by the HOME or BACK key.
377+
leaves the activity &mdash; 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 &mdash; the List Messages activity is
404+
pressing <em>Home</em> instead of <em>Back</em> &mdash; 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 &mdash; 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 &gt;
457+
chooses Contacts, selects the contact for viewing, chooses <em>Menu</em> &gt;
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 &gt; Share, and
490+
starts Gallery, picks a picture to view, chooses <em>Menu</em> &gt; 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 &gt; Messaging &gt; New message &gt; MENU &gt; Attach
735+
Home &gt; Messaging &gt; New message &gt; <em>Menu</em> &gt; Attach
733736
&gt; 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.

docs/html/guide/practices/ui_guidelines/menu_design.jd

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ parent.link=index.html
7171
<ul>
7272
<li>The <em>Options menu</em> contains primary functionality that applies
7373
globally to the current activity or starts a related activity.
74-
It is typically invoked by a user pressing a hard button, often labeled MENU.</li>
74+
It is typically invoked by a user pressing a hard button, often labeled <em>Menu</em>.</li>
7575
<li>The <em>Context menu</em> contains secondary functionality for the currently
7676
selected item. It is typically invoked by a user's touch &amp; hold
7777
on an item. Like on the Options menu, the operation can run either
@@ -109,10 +109,10 @@ or device to another.
109109
</p>
110110

111111
<p>
112-
On most devices, a user presses the MENU button to access the Options menu,
112+
On most devices, a user presses the <em>Menu</em> button to access the Options menu,
113113
as shown in the screenshot below. To close the menu, the user presses
114-
MENU again, or presses the BACK button.
115-
In fact, to cancel out of any menu, press the BACK button. (Pressing the MENU
114+
<em>Menu</em> again, or presses the <em>Back</em> button.
115+
In fact, to cancel out of any menu, press the <em>Back</em> button. (Pressing the <em>Menu</em>
116116
button or touching outside the menu also works.) Note that how to invoke this
117117
menu may be different on different devices.
118118
</p>
@@ -140,7 +140,7 @@ or device to another.
140140

141141
<ul>
142142
<li>
143-
<b>Options icon menu</b> - The first press of the MENU button displays a
143+
<b>Options icon menu</b> - The first press of the <em>Menu</em> button displays a
144144
non-scrollable grid of icons at the bottom of the screen. (On the G1
145145
phone, up to 6 buttons typically appear.)
146146
</li>
@@ -156,7 +156,7 @@ or device to another.
156156

157157
<p>
158158
On some versions of Android, the user can display keyboard shortcuts in the
159-
icon menu by long pressing the MENU button &mdash; the text in the icon menu
159+
icon menu by long pressing the <em>Menu</em> button &mdash; the text in the icon menu
160160
alternates between the command names and their keyboard shortcuts (if any).
161161
</p>
162162

@@ -299,7 +299,7 @@ or device to another.
299299
<a href="#location">location</a>) on the screen, put the command in the
300300
Context menu for that content. If the command acts on no specific content
301301
or location, put it in the Options menu. This separation of commands
302-
is enforced by the system in the following way. When you press the MENU
302+
is enforced by the system in the following way. When you press the <em>Menu</em>
303303
button to display the Options menu, the selected content becomes unselected,
304304
and so cannot be operated on. For an explanation
305305
of why the content becomes unselected, see the article on
@@ -340,7 +340,7 @@ or device to another.
340340

341341
<p>
342342
Before opening a Context menu, it has no visual representation that identifies
343-
its presence (whereas the Options menu has the MENU button), and so is not
343+
its presence (whereas the Options menu has the <em>Menu</em> button), and so is not
344344
particularly discoverable.
345345
Therefore, in general, a Context menu should <em>duplicate</em> commands
346346
found in the corresponding activity screen. For example, while it's useful to
@@ -459,7 +459,8 @@ or device to another.
459459
<h3 id="a_dialog_should_not_have_an_options_menu">A dialog should not have an Options menu</h3>
460460

461461
<p>
462-
When a dialog is displayed, pressing the MENU button should do nothing. This also holds true
462+
When a dialog is displayed, pressing the <em>Menu</em> button should do nothing. This also holds
463+
true
463464
for activities that look like dialogs. A dialog box is recognizable by being
464465
smaller than full-screen, having zero to three buttons, is non-scrollable, and
465466
possibly a list of selectable items that can include checkboxes or radio buttons.
@@ -475,7 +476,7 @@ or device to another.
475476
<h3 id="do_not_substitute_message">If an activity has no Options menu, do not display a message</h3>
476477

477478
<p>
478-
When the user presses the MENU button, if there is no Options menu, the system
479+
When the user presses the <em>Menu</em> button, if there is no Options menu, the system
479480
currently does nothing. We recommend you do not perform any action (such as
480481
displaying a message). It's a better user experience for this behavior to be
481482
consistent across applications.

docs/html/guide/topics/fundamentals/activities.jd

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ activity can then start another activity in order to perform different actions.
6363
activity starts, the previous activity is stopped, but the system preserves the activity
6464
in a stack (the "back stack"). When a new activity starts, it is pushed onto the back stack and
6565
takes user focus. The back stack abides to the basic "last in, first out" queue mechanism,
66-
so, when the user is done with the current activity and presses the BACK key, it
66+
so, when the user is done with the current activity and presses the <em>Back</em> button, it
6767
is popped from the stack (and destroyed) and the previous activity resumes. (The back stack is
6868
discussed more in the <a href="{@docRoot}guide/topics/fundamentals/tasks-and-back-stack.html">Tasks
6969
and Back Stack</a> document.)</p>
@@ -649,7 +649,8 @@ remains intact.</p>
649649
<p class="note"><strong>Note:</strong> There's no guarantee that {@link
650650
android.app.Activity#onSaveInstanceState onSaveInstanceState()} will be called before your
651651
activity is destroyed, because there are cases in which it won't be necessary to save the state
652-
(such as when the user leaves your activity using the BACK key, because the user is explicitly
652+
(such as when the user leaves your activity using the <em>Back</em> button, because the user is
653+
explicitly
653654
closing the activity). If the system calls {@link android.app.Activity#onSaveInstanceState
654655
onSaveInstanceState()}, it does so before {@link
655656
android.app.Activity#onStop onStop()} and possibly before {@link android.app.Activity#onPause

0 commit comments

Comments
 (0)