diff options
Diffstat (limited to 'docs/html/guide/topics/resources/menu-resource.jd')
-rw-r--r-- | docs/html/guide/topics/resources/menu-resource.jd | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/docs/html/guide/topics/resources/menu-resource.jd b/docs/html/guide/topics/resources/menu-resource.jd index c9f27fa..badc403 100644 --- a/docs/html/guide/topics/resources/menu-resource.jd +++ b/docs/html/guide/topics/resources/menu-resource.jd @@ -35,12 +35,12 @@ In XML: <code>@[<em>package</em>:]menu.<em>filename</em></code> <pre> <?xml version="1.0" encoding="utf-8"?> <<a href="#menu-element">menu</a> xmlns:android="http://schemas.android.com/apk/res/android"> - <<a href="#item-element">item</a> android:id="<em>resource ID</em>" + <<a href="#item-element">item</a> android:id="@+id/<em>id_name</em>" android:menuCategory=["container" | "system" | "secondary" | "alternative"] android:orderInCategory="<em>integer</em>" android:title="<em>string</em>" android:titleCondensed="<em>string</em>" - android:icon="<em>drawable resource</em>" + android:icon="@[package:]drawable/<em>drawable_resource_name</em>" android:alphabeticShortcut="<em>string</em>" android:numericShortcut="<em>string</em>" android:checkable=["true" | "false"] @@ -172,22 +172,22 @@ too long.</dd> <dd>XML file saved at <code>res/menu/example_menu.xml</code>: <pre> <menu xmlns:android="http://schemas.android.com/apk/res/android"> - <item android:id="@+id/example_item" - android:title="Example Item" - android:icon="@drawable/example_item_icon" /> - <group android:id="@+id/example_group"> + <item android:id="@+id/item1" + android:title="@string/item1" + android:icon="@drawable/group_item1_icon" /> + <group android:id="@+id/group"> <item android:id="@+id/group_item1" - android:title="Group Item 1" - android:icon="@drawable/example_item1_icon" /> + android:title="@string/group_item1" + android:icon="@drawable/group_item1_icon" /> <item android:id="@+id/group_item2" - android:title="Group Item 2" - android:icon="@drawable/example_item2_icon" /> + android:title="G@string/group_item2" + android:icon="@drawable/group_item2_icon" /> </group> <item android:id="@+id/submenu" - android:title="Sub Menu" > + android:title="@string/submenu_title" > <menu> - <item android:id="@+id/submenu_item" - android:title="Sub Menu Item" /> + <item android:id="@+id/submenu_item1" + android:title="@string/submenu_item1" /> </menu> </item> </menu> |