Searched refs:menu (Results 1 - 25 of 187) sorted by relevance

12345678

/development/samples/MySampleRss/src/com/example/codelab/rssexample/
H A DMyRssReader.java57 // Add our initial menu options. We will tweak this menu when it's loaded swap out
60 public boolean onCreateOptionsMenu(Menu menu){ argument
63 super.onCreateOptionsMenu(menu);
65 menu.add(0, 0, "Start RSS Service", null);
66 menu.add(0, 1, "Stop RSS Service", null);
67 menu.add(0, 2, "Add New Feed", null);
68 menu.add(0, 3, "Delete Feed", null);
69 menu.add(0, 4, "Update All Feeds", null);
76 public boolean onPrepareOptionsMenu(Menu menu){ argument
[all...]
/development/samples/ApiDemos/src/com/example/android/apis/app/
H A DActionBarUsage.java33 * includes the action bar by default and a menu resource is used to populate the
34 * menu data itself. If you'd like to see how these things work under the hood, see
49 public boolean onCreateOptionsMenu(Menu menu) { argument
51 inflater.inflate(R.menu.actions, menu);
52 SearchView searchView = (SearchView) menu.findItem(R.id.action_search).getActionView();
58 public boolean onPrepareOptionsMenu(Menu menu) { argument
60 Drawable icon = menu.findItem(mSortMode).getIcon();
61 menu.findItem(R.id.action_sort).setIcon(icon);
63 return super.onPrepareOptionsMenu(menu);
[all...]
H A DMenuInflateFromXml.java35 * Demonstrates inflating menus from XML. There are different menu XML resources
37 * the spinner, and then hit the menu button. To choose another, back out of the
42 * Different example menu resources.
45 R.menu.title_only, R.menu.title_icon, R.menu.submenu, R.menu.groups,
46 R.menu.checkable, R.menu.shortcuts, R.menu
124 onCreateOptionsMenu(Menu menu) argument
[all...]
H A DActionBarMechanics.java27 * standard options menu. This demo is for informative purposes only; see ActionBarUsage for
46 public boolean onCreateOptionsMenu(Menu menu) { argument
48 // they will show in the standard options menu panel when the menu button is pressed.
50 // Action Bar that will display remaining items in a cascading menu.
51 menu.add("Normal item");
53 MenuItem actionItem = menu.add("Action Button");
H A DActionBarSettingsActionProviderActivity.java36 * ActionProvider for launching the system settings and adds a menu item with that
45 public boolean onCreateOptionsMenu(Menu menu) { argument
46 super.onCreateOptionsMenu(menu);
47 getMenuInflater().inflate(R.menu.action_bar_settings_action_provider, menu);
58 // complete functionality of the menu item.
106 // This is called if the host menu item placed in the overflow menu of the
H A DPrintBitmap.java35 * menu. When the user chooses to print a helper class from the support
54 public boolean onCreateOptionsMenu(Menu menu) { argument
55 super.onCreateOptionsMenu(menu);
56 getMenuInflater().inflate(R.menu.print_custom_content, menu);
H A DPrintHtmlFromScreen.java69 public boolean onCreateOptionsMenu(Menu menu) { argument
70 super.onCreateOptionsMenu(menu);
72 getMenuInflater().inflate(R.menu.print_custom_content, menu);
H A DActionBarShareActionProviderActivity.java38 * a menu item with ShareActionProvider as its action provider. The
52 public boolean onCreateOptionsMenu(Menu menu) { argument
53 // Inflate your menu.
54 getMenuInflater().inflate(R.menu.action_bar_share_action_provider, menu);
57 MenuItem actionItem = menu.findItem(R.id.menu_item_share_action_provider_action_bar);
65 MenuItem overflowItem = menu.findItem(R.id.menu_item_share_action_provider_overflow);
/development/samples/Support7Demos/src/com/example/android/supportv7/app/
H A DActionBarUsage.java34 * includes the action bar by default and a menu resource is used to populate the
35 * menu data itself. If you'd like to see how these things work under the hood, see
50 public boolean onCreateOptionsMenu(Menu menu) { argument
52 inflater.inflate(R.menu.actions, menu);
54 .getActionView(menu.findItem(R.id.action_search));
60 public boolean onPrepareOptionsMenu(Menu menu) { argument
62 Drawable icon = menu.findItem(mSortMode).getIcon();
63 menu.findItem(R.id.action_sort).setIcon(icon);
65 return super.onPrepareOptionsMenu(menu);
[all...]
H A DActionBarMechanics.java28 * standard options menu. This demo is for informative purposes only; see ActionBarUsage for
47 public boolean onCreateOptionsMenu(Menu menu) { argument
49 // they will show in the standard options menu panel when the menu button is pressed.
51 // Action Bar that will display remaining items in a cascading menu.
52 menu.add("Normal item");
54 MenuItem actionItem = menu.add("Action Button");
H A DActionBarSettingsActionProviderActivity.java35 * ActionProvider for launching the system settings and adds a menu item with that
40 public boolean onCreateOptionsMenu(Menu menu) { argument
41 super.onCreateOptionsMenu(menu);
42 getMenuInflater().inflate(R.menu.action_bar_settings_action_provider, menu);
50 // complete functionality of the menu item.
87 // This is called if the host menu item placed in the overflow menu of the
/development/tutorials/NotepadCodeLab/Notepadv1/src/com/android/demo/notepad1/
H A DNotepadv1.java34 public boolean onCreateOptionsMenu(Menu menu) { argument
36 return super.onCreateOptionsMenu(menu);
/development/samples/ApiDemos/src/com/example/android/apis/view/
H A DLinearLayout8.java58 public boolean onCreateOptionsMenu(Menu menu) { argument
59 super.onCreateOptionsMenu(menu);
60 menu.add(0, VERTICAL_ID, 0, R.string.linear_layout_8_vertical);
61 menu.add(0, HORIZONTAL_ID, 0, R.string.linear_layout_8_horizontal);
62 menu.add(0, TOP_ID, 0, R.string.linear_layout_8_top);
63 menu.add(0, MIDDLE_ID, 0, R.string.linear_layout_8_middle);
64 menu.add(0, BOTTOM_ID, 0, R.string.linear_layout_8_bottom);
65 menu.add(0, LEFT_ID, 0, R.string.linear_layout_8_left);
66 menu.add(0, CENTER_ID, 0, R.string.linear_layout_8_center);
67 menu
[all...]
/development/samples/SkeletonApp/src/com/example/android/skeletonapp/
H A DSkeletonActivity.java72 * Called when your activity's options menu needs to be created.
75 public boolean onCreateOptionsMenu(Menu menu) { argument
76 super.onCreateOptionsMenu(menu);
81 menu.add(0, BACK_ID, 0, R.string.back).setShortcut('0', 'b');
82 menu.add(0, CLEAR_ID, 0, R.string.clear).setShortcut('1', 'c');
88 * Called right before your activity's option menu is displayed.
91 public boolean onPrepareOptionsMenu(Menu menu) { argument
92 super.onPrepareOptionsMenu(menu);
94 // Before showing the menu, we need to decide whether the clear
96 menu
[all...]
/development/samples/LunarLander/src/com/example/android/lunarlander/
H A DLunarLander.java61 * @param menu the Menu to which entries may be added
65 public boolean onCreateOptionsMenu(Menu menu) { argument
66 super.onCreateOptionsMenu(menu);
68 menu.add(0, MENU_START, 0, R.string.menu_start);
69 menu.add(0, MENU_STOP, 0, R.string.menu_stop);
70 menu.add(0, MENU_PAUSE, 0, R.string.menu_pause);
71 menu.add(0, MENU_RESUME, 0, R.string.menu_resume);
72 menu.add(0, MENU_EASY, 0, R.string.menu_easy);
73 menu.add(0, MENU_MEDIUM, 0, R.string.menu_medium);
74 menu
[all...]
/development/samples/ActionBarCompat/src/com/example/android/actionbarcompat/
H A DActionBarActivity.java28 * NOTE: dynamically marking menu items as invisible/visible is not currently supported.
67 * Note: marking menu items as invisible/visible is not currently supported.
70 public boolean onCreateOptionsMenu(Menu menu) { argument
72 retValue |= mActionBarHelper.onCreateOptionsMenu(menu);
73 retValue |= super.onCreateOptionsMenu(menu);
H A DMainActivity.java47 public boolean onCreateOptionsMenu(Menu menu) { argument
49 menuInflater.inflate(R.menu.main, menu);
51 // Calling super after populating the menu is necessary here to ensure that the
53 return super.onCreateOptionsMenu(menu);
/development/samples/browseable/PdfRendererBasic/src/com.example.android.pdfrendererbasic/
H A DMainActivity.java42 public boolean onCreateOptionsMenu(Menu menu) { argument
43 getMenuInflater().inflate(R.menu.main, menu);
/development/samples/browseable/ActionBarCompat-Basic/src/com.example.android.actionbarcompat.basic/
H A DMainActivity.java27 * action items. It covers inflating items from a menu resource, as well as adding an item in code.
42 * Use this method to instantiate your menu, and add your items to it. You
43 * should return true if you have added items to it and want the menu to be displayed.
46 public boolean onCreateOptionsMenu(Menu menu) { argument
47 // Inflate our menu from the resources by using the menu inflater.
48 getMenuInflater().inflate(R.menu.main, menu);
51 // resources (ids.xml) to ensure that all menu ids are distinct.
52 MenuItem locationItem = menu
[all...]
/development/samples/browseable/ActionBarCompat-Styled/src/com.example.android.actionbarcompat.styled/
H A DMainActivity.java56 public boolean onCreateOptionsMenu(Menu menu) { argument
57 // Inflate menu from menu resource (res/menu/main)
58 getMenuInflater().inflate(R.menu.main, menu);
60 return super.onCreateOptionsMenu(menu);
/development/samples/browseable/BasicContactables/src/com.example.android.basiccontactables/
H A DMainActivity.java78 public boolean onCreateOptionsMenu(Menu menu) { argument
79 // Inflate the menu; this adds items to the action bar if it is present.
80 getMenuInflater().inflate(R.menu.main, menu);
86 (SearchView) menu.findItem(R.id.search).getActionView();
/development/samples/browseable/DoneBar/src/com.example.android.donebar/
H A DDoneButtonActivity.java64 public boolean onCreateOptionsMenu(Menu menu) { argument
65 super.onCreateOptionsMenu(menu);
66 getMenuInflater().inflate(R.menu.cancel, menu);
/development/samples/training/InteractiveChart/src/com/example/android/interactivechart/
H A DMainActivity.java34 public boolean onCreateOptionsMenu(Menu menu) { argument
35 super.onCreateOptionsMenu(menu);
36 getMenuInflater().inflate(R.menu.main, menu);
/development/tutorials/NotepadCodeLab/Notepadv2/src/com/android/demo/notepad2/
H A DNotepadv2.java69 public boolean onCreateOptionsMenu(Menu menu) { argument
70 super.onCreateOptionsMenu(menu);
71 menu.add(0, INSERT_ID,0, R.string.menu_insert);
87 public void onCreateContextMenu(ContextMenu menu, View v, argument
89 super.onCreateContextMenu(menu, v, menuInfo);
/development/samples/NotePad/src/com/example/android/notepad/
H A DNotesList.java75 // The user does not need to hold down the key to use menu shortcuts.
92 * Sets the callback for context menu activation for the ListView. The listener is set
94 * ListView, and the context menu is handled by a method in NotesList.
144 * Sets up a menu that provides the Insert option plus a list of alternative actions for
149 * the menu will offer the user other applications that can handle notes.
150 * @param menu A Menu object, to which menu items should be added.
151 * @return True, always. The menu should be displayed.
154 public boolean onCreateOptionsMenu(Menu menu) { argument
155 // Inflate menu fro
172 onPrepareOptionsMenu(Menu menu) argument
301 onCreateContextMenu(ContextMenu menu, View view, ContextMenuInfo menuInfo) argument
[all...]

Completed in 642 milliseconds

12345678