summaryrefslogtreecommitdiffstats
path: root/docs/html/guide/practices/ui_guidelines
diff options
context:
space:
mode:
authorJean-Baptiste Queru <jbq@google.com>2009-07-31 17:38:20 -0700
committerJean-Baptiste Queru <jbq@google.com>2009-07-31 17:38:20 -0700
commit5c1207be90fdf296c1b83034b7c68915e1749284 (patch)
treee5679f6183458d8179821d5615dabafcb959704d /docs/html/guide/practices/ui_guidelines
parenta8675f67e33bc7337d148358783b0fd138b501ff (diff)
downloadframeworks_base-5c1207be90fdf296c1b83034b7c68915e1749284.zip
frameworks_base-5c1207be90fdf296c1b83034b7c68915e1749284.tar.gz
frameworks_base-5c1207be90fdf296c1b83034b7c68915e1749284.tar.bz2
donut snapshot
Diffstat (limited to 'docs/html/guide/practices/ui_guidelines')
-rw-r--r--docs/html/guide/practices/ui_guidelines/icon_design.jd240
-rw-r--r--docs/html/guide/practices/ui_guidelines/index.jd8
-rw-r--r--docs/html/guide/practices/ui_guidelines/menu_design.jd507
3 files changed, 527 insertions, 228 deletions
diff --git a/docs/html/guide/practices/ui_guidelines/icon_design.jd b/docs/html/guide/practices/ui_guidelines/icon_design.jd
index 155684a..5f0a278 100644
--- a/docs/html/guide/practices/ui_guidelines/icon_design.jd
+++ b/docs/html/guide/practices/ui_guidelines/icon_design.jd
@@ -25,7 +25,7 @@ application can use the standard icons by referencing them as resources.</li>
<li style="margin-top:4px;"><a href="#dodonts">General guidelines</a></li>
<li><a href="#templatespack">Using the Icon Templates Pack</a></li>
-<li><a href="#file">Icon appendix</a>
+<li><a href="#iconappendix">Icon appendix</a>
<ol>
<li><a href="#launcherapx">Launcher icons</a></li>
<li><a href="#menuapx">Menu icons</a></li>
@@ -989,25 +989,9 @@ simply look at image filenames, which use the format
<table class="image-caption">
<tr>
-
<td class="image-caption-i image-list">
<img src="{@docRoot}images/icon_design/ic_menu_add.png" title="ic_menu_add" alt="Android asset" />
<div class="caption">Add</div></td>
-
-
-<td class="image-caption-i image-list">
- <img src="{@docRoot}images/icon_design/ic_menu_archive.png" title="ic_menu_archive" alt="Android asset" />
- <div class="caption">Archive</div></td>
-
-
-<td class="image-caption-i image-list">
- <img src="{@docRoot}images/icon_design/ic_menu_attachment.png" title="ic_menu_attachment" alt="Android asset" />
- <div class="caption">Attach</div></td>
-
-
-<td class="image-caption-i image-list">
- <img src="{@docRoot}images/icon_design/ic_menu_back.png" title="ic_menu_back" alt="Android asset" />
- <div class="caption">Back</div></td>
<td class="image-caption-i image-list">
@@ -1024,9 +1008,6 @@ simply look at image filenames, which use the format
<img src="{@docRoot}images/icon_design/ic_menu_close_clear_cancel.png" title="ic_menu_close_clear_cancel" alt="Android asset" />
<div class="caption">Clear / Close / Cancel / Discard </div></td>
-</tr>
-<tr>
-
<td class="image-caption-i image-list">
<img src="{@docRoot}images/icon_design/ic_menu_compass.png" title="ic_menu_compass" alt="Android asset" />
@@ -1036,40 +1017,24 @@ simply look at image filenames, which use the format
<td class="image-caption-i image-list">
<img src="{@docRoot}images/icon_design/ic_menu_delete.png" title="ic_menu_delete" alt="Android asset" />
<div class="caption">Delete</div></td>
-
+
<td class="image-caption-i image-list">
<img src="{@docRoot}images/icon_design/ic_menu_directions.png" title="ic_menu_directions" alt="Android asset" />
<div class="caption">Directions</div></td>
-
+
+</tr>
+<tr>
<td class="image-caption-i image-list">
<img src="{@docRoot}images/icon_design/ic_menu_edit.png" title="ic_menu_edit" alt="Android asset" />
<div class="caption">Edit</div></td>
-<td class="image-caption-i image-list">
- <img src="{@docRoot}images/icon_design/ic_menu_favorite.png" title="ic_menu_favorite" alt="Android asset" />
- <div class="caption">Favorite</div></td>
-
-
-<td class="image-caption-i image-list">
- <img src="{@docRoot}images/icon_design/ic_menu_forward.png" title="ic_menu_forward" alt="Android asset" />
- <div class="caption">Forward</div></td>
-
-
<td class="image-caption-i image-list">
<img src="{@docRoot}images/icon_design/ic_menu_gallery.png" title="ic_menu_gallery" alt="Android asset" />
<div class="caption">Gallery</div></td>
-</tr>
-<tr>
-
-
-<td class="image-caption-i image-list">
- <img src="{@docRoot}images/icon_design/ic_menu_goto.png" title="ic_menu_goto" alt="Android asset" />
- <div class="caption">Go to</div></td>
-
<td class="image-caption-i image-list">
<img src="{@docRoot}images/icon_design/ic_menu_help.png" title="ic_menu_help" alt="Android asset" />
@@ -1077,16 +1042,6 @@ simply look at image filenames, which use the format
<td class="image-caption-i image-list">
- <img src="{@docRoot}images/icon_design/ic_menu_recent_history.png" title="ic_menu_recent_history" alt="Android asset" />
- <div class="caption">History</div></td>
-
-
-<td class="image-caption-i image-list">
- <img src="{@docRoot}images/icon_design/ic_menu_home.png" title="ic_menu_home" alt="Android asset" />
- <div class="caption">Home</div></td>
-
-
-<td class="image-caption-i image-list">
<img src="{@docRoot}images/icon_design/ic_menu_info_details.png" title="ic_menu_info_details" alt="Android asset" />
<div class="caption">Info / details</div></td>
@@ -1094,14 +1049,6 @@ simply look at image filenames, which use the format
<td class="image-caption-i image-list">
<img src="{@docRoot}images/icon_design/ic_menu_mapmode.png" title="ic_menu_mapmode" alt="Android asset" />
<div class="caption">Map mode</div></td>
-
-
-<td class="image-caption-i image-list">
- <img src="{@docRoot}images/icon_design/ic_menu_mark.png" title="ic_menu_mark" alt="Android asset" />
- <div class="caption">Mark</div></td>
-
-</tr>
-<tr>
<td class="image-caption-i image-list">
@@ -1113,11 +1060,8 @@ simply look at image filenames, which use the format
<img src="{@docRoot}images/icon_design/ic_menu_more.png" title="ic_menu_more" alt="Android asset" />
<div class="caption">More</div></td>
-
-<td class="image-caption-i image-list">
- <img src="{@docRoot}images/icon_design/ic_menu_play_clip.png" title="ic_menu_play_clip" alt="Android asset" />
- <div class="caption">Play</div></td>
-
+</tr>
+<tr>
<td class="image-caption-i image-list">
<img src="{@docRoot}images/icon_design/ic_menu_preferences.png" title="ic_menu_preferences" alt="Android asset" />
@@ -1125,11 +1069,6 @@ simply look at image filenames, which use the format
<td class="image-caption-i image-list">
- <img src="{@docRoot}images/icon_design/ic_menu_refresh.png" title="ic_menu_refresh" alt="Android asset" />
- <div class="caption">Refresh</div></td>
-
-
-<td class="image-caption-i image-list">
<img src="{@docRoot}images/icon_design/ic_menu_rotate.png" title="ic_menu_rotate" alt="Android asset" />
<div class="caption">Rotate</div></td>
@@ -1138,9 +1077,6 @@ simply look at image filenames, which use the format
<img src="{@docRoot}images/icon_design/ic_menu_save.png" title="ic_menu_save" alt="Android asset" />
<div class="caption">Save</div></td>
-</tr>
-<tr>
-
<td class="image-caption-i image-list">
<img src="{@docRoot}images/icon_design/ic_menu_send.png" title="ic_menu_send" alt="Android asset" />
@@ -1158,26 +1094,15 @@ simply look at image filenames, which use the format
<td class="image-caption-i image-list">
- <img src="{@docRoot}images/icon_design/ic_menu_shuffle.png" title="ic_menu_shuffle" alt="Android asset" />
- <div class="caption">Shuffle</div></td>
-
-
-<td class="image-caption-i image-list">
<img src="{@docRoot}images/icon_design/ic_menu_upload.png" title="ic_menu_upload" alt="Android asset" />
<div class="caption">Upload</div></td>
-
+
+</tr>
+<tr>
<td class="image-caption-i image-list">
<img src="{@docRoot}images/icon_design/ic_menu_view.png" title="ic_menu_view" alt="Android asset" />
<div class="caption">View</div></td>
-
-
-<td class="image-caption-i image-list">
- <img src="{@docRoot}images/icon_design/ic_menu_camera_video_view.png" title="ic_menu_camera_video_view" alt="Android asset" />
- <div class="caption">Video</div></td>
-
-</tr>
-<tr>
<td class="image-caption-i image-list">
@@ -1214,131 +1139,21 @@ or simply look at the image filename, which use the format
<tr>
<td class="image-caption-i image-list">
- <img src="{@docRoot}images/icon_design/stat_sys_data_connected_3g.png" title="stat_sys_data_connected_3g" alt="Android asset" />
- <div class="caption">3G</div></td>
-
-<td class="image-caption-i image-list">
- <img src="{@docRoot}images/icon_design/stat_sys_signal_flightmode.png" title="stat_sys_signal_flightmode" alt="Android asset" />
- <div class="caption">Airplane mode</div></td>
-
-
-<td class="image-caption-i image-list">
- <img src="{@docRoot}images/icon_design/stat_notify_alarm.png" title="stat_notify_alarm" alt="Android asset" />
- <div class="caption">Alarm</div></td>
-
-
-<td class="image-caption-i image-list">
<img src="{@docRoot}images/icon_design/stat_sys_data_bluetooth.png" title="stat_sys_data_bluetooth" alt="Android asset" />
<div class="caption">Bluetooth</div></td>
<td class="image-caption-i image-list">
- <img src="{@docRoot}images/icon_design/stat_sys_data_bluetooth_connected.png" title="stat_sys_data_bluetooth_connected" alt="Android asset" />
- <div class="caption">Bluetooth connected</div></td>
-
-
-<td class="image-caption-i image-list">
- <img src="{@docRoot}images/icon_design/stat_notify_calendar.png" title="stat_notify_calendar" alt="Android asset" />
- <div class="caption">Calendar</div></td>
-
-
-<td class="image-caption-i image-list">
- <img src="{@docRoot}images/icon_design/stat_notify_disk_full.png" title="stat_notify_disk_full" alt="Android asset" />
- <div class="caption">Disk full</div></td>
-
-</tr>
-<tr>
-
-<td class="image-caption-i image-list">
- <img src="{@docRoot}images/icon_design/stat_sys_data_connected_e.png" title="stat_sys_data_connected_e" alt="Android asset" />
- <div class="caption">EDGE</div></td>
-
-
-<td class="image-caption-i image-list">
<img src="{@docRoot}images/icon_design/stat_notify_email_generic.png" title="stat_notify_email_generic" alt="Android asset" />
<div class="caption">Email</div></td>
<td class="image-caption-i image-list">
- <img src="{@docRoot}images/icon_design/stat_notify_email.png" title="stat_notify_email" alt="Android asset" />
- <div class="caption">Gmail</div></td>
-
-
-<td class="image-caption-i image-list">
- <img src="{@docRoot}images/icon_design/stat_sys_data_connected_g.png" title="stat_sys_data_connected_g" alt="Android asset" />
- <div class="caption">GPRS</div></td>
-
-
-<td class="image-caption-i image-list">
<img src="{@docRoot}images/icon_design/stat_notify_chat.png" title="stat_notify_chat" alt="Android asset" />
<div class="caption">IM</div></td>
<td class="image-caption-i image-list">
- <img src="{@docRoot}images/icon_design/stat_sys_install_complete.png" title="stat_sys_install_complete" alt="Android asset" />
- <div class="caption">Installation complete</div></td>
-
-
-<td class="image-caption-i image-list">
- <img src="{@docRoot}images/icon_design/stat_notify_musicplayer.png" title="stat_notify_musicplayer" alt="Android asset" />
- <div class="caption">Music</div></td>
-
-</tr>
-<tr>
-
-<td class="image-caption-i image-list">
- <img src="{@docRoot}images/icon_design/stat_sys_r_signal_4.png" title="stat_sys_r_signal_4" alt="Android asset" />
- <div class="caption">Roaming</div></td>
-
-
-<td class="image-caption-i image-list">
- <img src="{@docRoot}images/icon_design/stat_sys_signal_4.png" title="stat_sys_signal_4" alt="Android asset" />
- <div class="caption">Signal</div></td>
-
-
-<td class="image-caption-i image-list">
- <img src="{@docRoot}images/icon_design/stat_sys_signal_null.png" title="stat_sys_signal_null" alt="Android asset" />
- <div class="caption">Signal unavailable</div></td>
-
-
-<td class="image-caption-i image-list">
- <img src="{@docRoot}images/icon_design/stat_sys_ringer_silent_old.png" title="stat_sys_ringer_silent_old" alt="Android asset" />
- <div class="caption">Silent mode</div></td>
-
-
-<td class="image-caption-i image-list">
- <img src="{@docRoot}images/icon_design/stat_notify_sms.png" title="stat_notify_sms" alt="Android asset" />
- <div class="caption">SMS/MMS</div></td>
-
-
-<td class="image-caption-i image-list">
- <img src="{@docRoot}images/icon_design/stat_sys_speakerphone.png" title="stat_sys_speakerphone" alt="Android asset" />
- <div class="caption">Speaker phone</div></td>
-
-
-<td class="image-caption-i image-list">
- <img src="{@docRoot}images/icon_design/stat_notify_sync_anim0.png" title="stat_notify_sync_anim0" alt="Android asset" />
- <div class="caption">Sync</div></td>
-
-</tr>
-<tr>
-
-<td class="image-caption-i image-list">
- <img src="{@docRoot}images/icon_design/stat_notify_sync_error.png" title="stat_notify_sync_error" alt="Android asset" />
- <div class="caption">Sync error</div></td>
-
-
-<td class="image-caption-i image-list">
- <img src="{@docRoot}images/icon_design/stat_sys_data_usb.png" title="stat_sys_data_usb" alt="Android asset" />
- <div class="caption">USB connected</div></td>
-
-
-<td class="image-caption-i image-list">
- <img src="{@docRoot}images/icon_design/stat_sys_ringer_vibrate.png" title="stat_sys_ringer_vibrate" alt="Android asset" />
- <div class="caption">Vibrate</div></td>
-
-
-<td class="image-caption-i image-list">
<img src="{@docRoot}images/icon_design/stat_notify_voicemail.png" title="stat_notify_voicemail" alt="Android asset" />
<div class="caption">Voicemail</div></td>
@@ -1349,32 +1164,6 @@ or simply look at the image filename, which use the format
<td class="image-caption-i image-list">
- <img src="{@docRoot}images/icon_design/stat_sys_wifi_signal_4.png" title="stat_sys_wifi_signal_4" alt="Android asset" />
- <div class="caption">WiFi</div></td>
-
-
-<td class="image-caption-i image-list">
- <img src="{@docRoot}images/icon_design/stat_notify_wifi_in_range.png" title="stat_notify_wifi_in_range" alt="Android asset" />
- <div class="caption">WiFi network available</div></td>
-
-</tr>
-<tr>
-
-<td class="image-caption-i image-list">
- <img src="{@docRoot}images/icon_design/stat_sys_wifi_unavailable.png" title="stat_sys_wifi_unavailable" alt="Android asset" />
- <div class="caption">WiFi unavailable</div></td>
-
-<td class="image-caption-i image-list">
- <img src="{@docRoot}images/icon_design/stat_sys_battery_100.png" title="stat_sys_battery_100" alt="Android asset" />
- <div class="caption">Battery 100%</div></td>
-
-
-<td class="image-caption-i image-list">
- <img src="{@docRoot}images/icon_design/stat_sys_battery_empty.png" title="stat_sys_battery_empty" alt="Android asset" />
- <div class="caption">Battery empty</div></td>
-
-
-<td class="image-caption-i image-list">
<img src="{@docRoot}images/icon_design/stat_sys_phone_call.png" title="stat_sys_phone_call" alt="Android asset" />
<div class="caption">Call</div></td>
@@ -1383,6 +1172,8 @@ or simply look at the image filename, which use the format
<img src="{@docRoot}images/icon_design/stat_sys_phone_call_forward.png" title="stat_sys_phone_call_forward" alt="Android asset" />
<div class="caption">Call forward</div></td>
+</tr>
+<tr>
<td class="image-caption-i image-list">
<img src="{@docRoot}images/icon_design/stat_sys_phone_call_on_hold.png" title="stat_sys_phone_call_on_hold" alt="Android asset" />
@@ -1390,13 +1181,6 @@ or simply look at the image filename, which use the format
<td class="image-caption-i image-list">
- <img src="{@docRoot}images/icon_design/stat_sys_gps_on.png" title="stat_sys_gps_on" alt="Android asset" />
- <div class="caption">GPS on</div></td>
-
-</tr>
-<tr>
-
-<td class="image-caption-i image-list">
<img src="{@docRoot}images/icon_design/stat_notify_missed_call.png" title="stat_notify_missed_call" alt="Android asset" />
<div class="caption">Missed call</div></td>
diff --git a/docs/html/guide/practices/ui_guidelines/index.jd b/docs/html/guide/practices/ui_guidelines/index.jd
index 0b9d275..2d14fa6 100644
--- a/docs/html/guide/practices/ui_guidelines/index.jd
+++ b/docs/html/guide/practices/ui_guidelines/index.jd
@@ -39,6 +39,14 @@ graphics files and templates that will make your designer's life easier.</dd>
multitasking, activity reuse, intents, the activity stack, and
tasks. It covers this all from a high-level design perspective.
</dd>
+ <dt><a href="{@docRoot}guide/practices/ui_guidelines/menu_design.html">Menu Design Guidelines</a> </dt>
+ <dd>Android applications make use of Option menus and Context menus
+ that enable users to perform operations and navigate to other parts
+ of your application or to other applications. These guidelines describe
+ the difference between Options and Context menus, how to arrange
+ menu items, when to put commands on-screen, and other details about
+ menu design.
+</dd>
</dl>
diff --git a/docs/html/guide/practices/ui_guidelines/menu_design.jd b/docs/html/guide/practices/ui_guidelines/menu_design.jd
new file mode 100644
index 0000000..518cea1
--- /dev/null
+++ b/docs/html/guide/practices/ui_guidelines/menu_design.jd
@@ -0,0 +1,507 @@
+page.title=Menu Design Guidelines
+@jd:body
+
+<div id="qv-wrapper">
+<div id="qv">
+
+<h2>Menu design quickview</h2>
+
+<ul>
+ <li>An Options menu is for any commands that are global to the current activity. </li>
+ <li>A Context menu is for any commands that apply to the current selection. </li>
+ <li>Place the most frequently used operations first. </li>
+ <li>Put only the most important commands fixed on the screen. </li>
+ <li>The commands on the Context menu that appears when you touch &amp; hold on an item should be duplicated on the activity you get to by a normal press on that item.
+</ul>
+
+
+<h2>In this document</h2>
+
+<ol>
+ <li><a href=#tour_of_the_menus>Tour of the Menus</a>
+ <ol>
+ <li style="padding-top: 4px;"><a href=#options_menu>Options Menu</a></li>
+ <li style="padding-top: 4px;"><a href=#context_menu>Context Menu</a></li>
+ <li style="padding-top: 4px;"><a href=#comparison_of_options_and_context_menus>Comparison of Options &amp; Context Menus</a></li>
+ <li style="padding-top: 4px;"><a href=#commands_fixed>Commands Fixed in an Activity Screen</a></li>
+ </ol>
+ </li>
+ <li><a href=#guidelines>Guidelines</a>
+ <ol>
+ <li style="padding-top: 4px;"><a href=#separate_commands>Separate specific from global commands</a></li>
+ <li style="padding-top: 4px;"><a href=#most_frequently_used>Place most frequently used first</a></li>
+ <li style="padding-top: 4px;"><a href=#dont_put_commands>Don't put commands <em>only</em> in a Context menu</li>
+ <li style="padding-top: 4px;"><a href=#first_in_context_menu>First command in Context menu should be most intuitive</li>
+ <li style="padding-top: 4px;"><a href=#selecting_content_item>Selecting an item should perform most intuitive operation</a></li>
+ <li style="padding-top: 4px;"><a href=#context_menu_should_identify>A Context menu should identify the selected item</li>
+ <li style="padding-top: 4px;"><a href=#most_important_commands>Put only most important commands fixed on the screen</a></li>
+ <li style="padding-top: 4px;"><a href=#short_names>Use short names in Options icon menu</a></li>
+ <li style="padding-top: 4px;"><a href=#a_dialog_should_not_have_an_options_menu>A dialog should not have Options menu</a></li>
+ <li style="padding-top: 4px;"><a href=#do_not_substitute_message>If no Options menu, don't display message</a></li>
+ <li style="padding-top: 4px;"><a href=#dim_hide_menu_items>Dim or hide menu items not available</a></li>
+ </ol>
+ </li>
+</ol>
+
+<h2>See also</h2>
+
+<ol>
+ <li><a href="http://android-developers.blogspot.com/2008/12/touch-mode.html">Touch mode</a></li>
+ <li><a href="{@docRoot}guide/practices/ui_guidelines/activity_task_design.html">Activity and Task Design</a></li>
+</ol>
+
+</div>
+</div>
+
+<p>
+ A menu holds a set of commands (user actions) that are normally hidden, and
+ are accessible by a button, key, or gesture. Menu commands provide a means
+ for performing operations and for navigating to other parts of your
+ application or other applications. Menus are useful for freeing screen space,
+ as an alternative to placing functionality and navigation, in buttons or other
+ user controls in the content area of your application.
+</p>
+
+<p>
+ The Android system provides two types of menus you can use to provide
+ functionality or navigation. Between them, you should be able to organize
+ the functionality and navigation for your application. Briefly:
+ <ul>
+ <li>The <em>Options menu</em> contains primary functionality that applies
+ globally to the current activity or starts a related activity.
+ It is typically invoked by a user pressing a hard button, often labeled MENU.</li>
+ <li>The <em>Context menu</em> contains secondary functionality for the currently
+ selected item. It is typically invoked by a user's touch &amp; hold
+ on an item. Like on the Options menu, the operation can run either
+ in the current or another activity.</li>
+ </ul>
+</p>
+
+<p>
+ All but the simplest applications have menus. The system automatically
+ lays the menus out and provides standard ways for users to access them.
+ In this sense, they are familiar and dependable ways for users to access
+ functionality across all applications. All menus are panels that "float"
+ on top of the activity screen and are smaller than full screen, so that the
+ application is still visible around its edges. This is a visual reminder
+ that a menu is an intermediary operation that disappears once it's used.
+</p>
+
+<p>
+ Let's start out with a quick tour of the menus.
+</p>
+
+<h2 id="tour_of_the_menus">Tour of the Menus</h2>
+
+<blockquote>
+ <b>NOTE</b> - Your menus and screens might not look like those shown in this document;
+ they may vary from one version of Android or device to another.
+</blockquote>
+
+<h3 id="options_menu">Options Menu</h3>
+
+<p>
+ The Options menu contains commands that apply globally across the current
+ activity, or can start another activity. They do not apply to a selected
+ item in the content (a <a href="#context_menu">Context menu</a> does that).
+</p>
+
+<p>
+ On most devices, a user presses the MENU button to access the Options menu,
+ as shown in the screenshot below. To close the menu, the user presses
+ MENU again, or presses the BACK button.
+ In fact, to cancel out of any menu, press the BACK button. (Pressing the MENU
+ button or touching outside the menu also works.) Note that how to invoke this
+ menu may be different on different devices.
+</p>
+
+<p>
+ Each
+ <a href="{@docRoot}guide/practices/ui_guidelines/activity_task_design.html#activities">activity</a>
+ activity has its own set of operations and therefore its own Options menu.
+ An application with multiple activities would have a different Options menu
+ for each activity.
+</p>
+
+<p>
+ For example, in the message list view of an email program, the Options menu
+ might let you search the messages, compose a new message, refresh the list,
+ or change the email settings. The compose view of an email program would
+ have a different Options menu, such as adding a CC field, attaching a file,
+ or discarding the message.
+</p>
+
+<p id="options_icon_expanded_menus">
+ In order to handle a large number of menu items, the Options menu
+ progressively discloses them in two steps:
+</p>
+
+<ul>
+ <li>
+ <b>Options icon menu</b> - The first press of the MENU button displays a
+ non-scrollable grid of icons at the bottom of the screen. (On the G1
+ phone, up to 6 buttons typically appear.)
+ </li>
+ <li>
+ <b>Options expanded menu</b> - If the activity has more menu items than will
+ fit on the icon menu, then the last icon is labeled "More" &mdash; selecting it
+ displays a list that can contain any number of menu items and will scroll
+ as necessary.
+ </li>
+</ul>
+
+<img src={@docRoot}images/menu_design/MenuDiagram.png>
+
+<p>
+ On some versions of Android, the user can display keyboard shortcuts in the
+ icon menu by long pressing the MENU button &mdash; the text in the icon menu
+ alternates between the command names and their keyboard shortcuts (if any).
+</p>
+
+<h3 id="context_menu">Context Menu</h3>
+
+<p>
+ A Context menu is similar to a right-click context menu in a desktop
+ operating system. It is normally a shortcut that duplicates commands
+ found elsewhere.
+</p>
+
+<p>
+ A user can touch &amp; hold on content on the screen to
+ access a Context menu (if one exists), as shown in the screenshot below.
+ A Context menu is a list of menu items (commands) that can operate
+ on the selected content. The command can either be part of the current
+ activity, or the system can pass the selected content along to
+ an operation in another activity (by way of an
+ <a href="{@docRoot}guide/practices/ui_guidelines/activity_task_design.html#intents">intent</a>).
+</p>
+
+<p>
+ For example, in an email message list, a user can touch &amp; hold on
+ an email message to open a Context menu containing commands to read,
+ archive, or delete the message.
+</p>
+
+<p id="location">
+ A user can also touch &amp; hold a <em>location</em> on the screen to
+ access a Context menu. An example is when the user does touch &amp; hold
+ on a blank spot on the Home screen, a Context menu appears; selecting
+ an item from that menu inserts an icon at that location.
+</p>
+
+<img src={@docRoot}images/menu_design/ContextMenuDiagram.png>
+
+<h4 id="context_menu_shortcut">Context Menu is a Shortcut</h4>
+
+<p>
+ In the above example, if the user performs touch &amp; hold on the contact
+ "Obi Wan Kenobi", a Context menu opens. The commands provided in
+ this Context menu are the complete set of actions that can be performed
+ on this contact.
+</p>
+
+<p>
+ A normal touch on an item in the content activates the most intuitive
+ command for that selection &mdash; in this case, "View contact".
+ We recommend that the most intuitive command also be listed as the
+ first item in the Context menu. In this example, selecting the contact
+ "Obi Wan Kenobi" runs the same command "View contact" that is listed
+ at the top of the Context menu.
+</p>
+
+<p>
+ Also note, as shown in the following screenshot, the Context menu and the
+ next screen both hold the same complete set of commands that can be performed
+ on this contact. The Context menu displays the commands in a list,
+ while the "View contact" activity splits them into various items in the
+ Options menu, icon buttons and list items.
+</p>
+
+<p>
+ Because of this duplication, using the Context menu is considered a <em>shortcut</em>
+ for going to the next screen and performing the operation there. Context menus
+ are less discoverable than either buttons fixed on-screen or the Options menu.
+ Many users never discover or use Context menus. It is for this reason that, for
+ the most part, any command on a Context menu should also appear on the most
+ intuitive operation's screen. As the next section explains, text operations,
+ such as "Select text" might appear only on a Context menu. Also, rich
+ applications, such as browsers, which themselves can contain web applications,
+ may have commands on Context menus that are not available elsewhere.
+</p>
+
+<img src={@docRoot}images/menu_design/ContextMenuViewContactDiagram.png>
+
+<h4>Text Commands in Context Menu</h4>
+
+<p>
+ Text links and text fields in the content both have system-provided operations
+ that are common across all applications: operations such as "Select all", "Select text",
+ "Copy all", and "Add to dictionary". If the text field is editable, it also
+ has other operations, such as "Cut all" and "Input Method", and if text
+ is also on the clipboard, it has "Paste". The system automatically inserts
+ the appropriate menu items into the Context menu of text links and text
+ fields, as shown in the following screenshot.
+</p>
+
+<img src={@docRoot}images/menu_design/TextFieldContextMenuDiagram.png>
+
+
+<h3 id="comparison_of_options_and_context_menus">Comparison of Options and Context Menus</h3>
+
+<p>
+ An Options menu holds commands that are global to the activity while a
+ Context menu holds commands that apply only to an item in the content.
+ As shown in these diagrams, the user navigates to the menu, then
+ touches a menu item to perform an action or open a dialog.
+</p>
+
+<img src={@docRoot}images/menu_design/TaskFlowDiagram.png>
+
+<p>
+ For more technical information on menus, see
+ <a href="{@docRoot}guide/topics/ui/menus.html">Creating Menus</a>.
+</p>
+
+<h3 id="commands_fixed">Commands Fixed in an Activity Screen</h4>
+
+<p>
+ Commands can also be fixed directly on screen, typically in
+ text buttons, graphic buttons, or list items. This placement is by far the most
+ discoverable location for commands &mdash; a user can immediately see the command
+ without having to first press a button. This increased visibility needs to be
+ weighed against the space such user controls take up, or the sense that they
+ might clutter the visual design.
+</p>
+
+<h2 id="guidelines">Guidelines</h2>
+
+<p>
+ Selecting the right kind of menu to present, and using menus
+ consistently, are critical factors in good application design. The following
+ guidelines should assist user experience designers and application developers
+ toward this end.
+</p>
+
+<h3 id="separate_commands">Separate selection-specific commands from global commands</h3>
+
+<p>
+ Put any commands that are global to the current activity in the Options menu
+ or place them fixed in an activity screen; put commands that apply to the
+ current selection in the Context menu. (In any case, the command
+ could either run as part of this activity or start another activity.)
+</p>
+
+<p>
+ You can determine in which menu to place a command by what it operates on:
+ If the command acts on selected content (or a particular
+ <a href="#location">location</a>) on the screen, put the command in the
+ Context menu for that content. If the command acts on no specific content
+ or location, put it in the Options menu. This separation of commands
+ is enforced by the system in the following way. When you press the MENU
+ button to display the Options menu, the selected content becomes unselected,
+ and so cannot be operated on. For an explanation
+ of why the content becomes unselected, see the article on
+ <a href="http://android-developers.blogspot.com/2008/12/touch-mode.html">Touch mode</a>.
+</p>
+
+<p>
+ An example of a selection-specific Context menu is when a user performs a
+ touch &amp; hold on a person's name in a list view of a contacts application.
+ The Context menu would typically contain commands "View contact", "Call contact",
+ and "Edit contact".
+</p>
+
+<h3 id="most_frequently_used">Place the most frequently used operations first</h3>
+
+<p>
+ Because of limited screen height, some menus may be scrollable, so it's
+ important to place the most important commands so they can be viewed without
+ scrolling. In the case of the Options menu, place the most frequently used
+ operation on its <a href="#options_icon_expanded_menus">icon menu</a>;
+ the user will have to select "More" to see the rest.
+ It's also useful to place similar commands in the same location &mdash;
+ for example, the Search icon might always be the first icon in the Options
+ menu across several activities that offer search.
+</p>
+
+<p>
+ In a Context menu, the most intuitive command should be first, followed
+ by commands in order of decreasing use, with the least used command at the bottom.
+</p>
+
+<h3 id="dont_put_commands">Don't put commands <em>only</em> in a Context menu</h3>
+<p>
+ If a user can fully access your application without using Context menus,
+ then it's designed properly! In general, if part of your application is inaccessible
+ without using Context menus, then you need to duplicate those commands elsewhere.
+</p>
+
+<p>
+ Before opening a Context menu, it has no visual representation that identifies
+ its presence (whereas the Options menu has the MENU button), and so is not
+ particularly discoverable.
+ Therefore, in general, a Context menu should <em>duplicate</em> commands
+ found in the corresponding activity screen. For example, while it's useful to
+ let the user call a phone number from a Context menu invoked by touch
+ &amp; hold on a name in a list of contacts, that operation should <em>also</em>
+ be available by the user touching the phone number itself when viewing contact details.
+ See <a href="#context_menu_shortcut">shortcut</a> for an illustration of this example.
+</p>
+
+<h3 id="first_in_context_menu">The first command in a Context menu should be the selection's most intuitive command</h3>
+
+<p>
+ As described under <a href="#context_menu_shortcut">shortcut</a>,
+ touching on an item in the content should activate the same command as touching
+ the first item in the Context menu. Both cases should be the most intuitive
+ operation for that item.
+</p>
+
+<h3 id="selecting_content_item">Selecting an item in the content should perform the most intuitive operation</h3>
+
+<p>
+ In your application, when the user touches any actionable text (such as a link
+ or list item) or image (such as a photo icon), execute the operation most
+ likely to be desired by the user.
+</p>
+
+<p>
+ Some examples of primary operations:
+</p>
+
+<ul>
+ <li>Selecting an image executes "View image"</li>
+ <li>Selecting a media icon or filename executes "Play"</li>
+ <li>Selecting a URL link executes "Open link"</li>
+ <li>Selecting an address executes "Go to address" (in a maps application)</li>
+</ul>
+
+<p>
+ Note that selecting the same item in different contexts might invoke
+ different operations:
+</p>
+
+<ul>
+ <li>In a contact application, selecting a contact executes "View details"</li>
+ <li>In an IM application, selecting a contact executes "Start chat"</li>
+ <li>In an Email application, when adding a recipient to the "To" field
+ through the contact book, selecting a contact executes "Add to recipient
+ list"</li>
+</ul>
+
+
+<h3 id="context_menu_should_identify">A Context menu should identify the selected item</h3>
+
+<p>
+ When a user does touch &amp; hold on an item, the Context menu should
+ contain the name of the selected item. Therefore,
+ when creating a Context menu, be sure to include a title and the name of the
+ selected item so that it's clear to the user what the context is.
+ For example, if a user selects a contact "Joan of Arc", put that name in the
+ title of the Context menu (using
+ {@link android.view.ContextMenu#setHeaderTitle(java.lang.CharSequence) setHeaderTitle}).
+ Likewise, a command to edit the contact should be called "Edit contact",
+ not just "Edit".
+</p>
+
+
+<h3 id="most_important_commands">Put only the most important commands fixed on the screen</h3>
+
+<p>
+ By putting commands in menus, you free up the screen to hold more content.
+ On the other hand, fixing commands in the content area of an activity
+ makes them more prominent and easy to use.
+</p>
+
+<p>
+ Here are a number of important reasons to place commands fixed on the activity screen:
+</p>
+
+ <ul>
+ <li>
+ To give a command the highest prominence, ensuring the command is obvious and won't be overlooked.<br>
+ Example: A "Buy" button in a store application.
+ </li>
+ <li>
+ When quick access to the command is important and going to the menu would be
+ tedious or slow.<br>
+ Example: Next/Previous buttons or Zoom In/Out buttons in an image viewing application.
+ </li>
+ <li>
+ When in the middle of an operation that needs to be completed.<br>
+ Example: Save/Discard buttons in an image crop activity.
+ </li>
+ <li>
+ Dialogs and wizards.<br>
+ Example: OK/Cancel buttons
+ </li>
+ <li>
+ For direct manipulation.<br>
+ Example: Dragging an icon in the Home screen to the trash
+ </li>
+ </ul>
+
+<h3 id="short_names">Use short names in the Options icon menu</h3>
+
+<p>
+ If a text label in the <a href="#options_icon_expanded_menus">Options icon menu</a>
+ is too long, the system truncates it in the middle. Thus, "Create Notification"
+ is truncated to something like "Create…ication". You have no control over
+ this truncation, so the best bet is to keep the text short. In some versions of Android,
+ when the icon is highlighted by a navigation key (such as a trackball), the
+ entire descriptive text may be shown as a marquee, where the words are
+ readable as they scroll by. <!--For more information, see the Text Guidelines
+ [update link].-->
+</p>
+
+<h3 id="a_dialog_should_not_have_an_options_menu">A dialog should not have an Options menu</h3>
+
+<p>
+ When a dialog is displayed, pressing the MENU button should do nothing. This also holds true
+ for activities that look like dialogs. A dialog box is recognizable by being
+ smaller than full-screen, having zero to three buttons, is non-scrollable, and
+ possibly a list of selectable items that can include checkboxes or radio buttons.
+ <!--For examples of dialogs, see Text Guidelines.-->
+</p>
+
+<p>
+ The rationale behind not having a menu is that when a dialog is displayed, the user is in
+ the middle of a procedure and should not be allowed to start a new global task
+ (which is what the Option menu provides).
+</p>
+
+<h3 id="do_not_substitute_message">If an activity has no Options menu, do not display a message</h3>
+
+<p>
+ When the user presses the MENU button, if there is no Options menu, the system
+ currently does nothing. We recommend you do not perform any action (such as
+ displaying a message). It's a better user experience for this behavior to be
+ consistent across applications.
+</p>
+
+
+
+<h3 id="dim_hide_menu_items">Dim or hide menu items that are not available in the current context</h3>
+
+<p>
+ Sometimes a menu item's action cannot be performed &mdash; for example,
+ the "Forward" button in a browser cannot work until after the "Back"
+ button has been pressed. We recommend:
+</p>
+
+<ul>
+ <li>
+ <b>In Options menu</b> - disable the menu item, which dims the text and icon,
+ turning it gray. This applies to menu items in both the icon menu and the
+ "More" menu. It would be disorienting for the icon menu to change from 6
+ items to 5 items, and we treat the "More" menu the same way.
+ </li>
+ <li>
+ <b>In Context menu</b> - hide the menu item. This makes the menu shorter so the
+ user sees only available choices (which also reduces any scrolling).
+ </li>
+</ul>
+
+</body>
+</html>
+