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

12

/frameworks/base/tests/FrameworkTest/src/com/android/frameworktest/menus/
H A DListContextMenu.java98 public boolean onCreateOptionsMenu(Menu menu) { argument
99 MenuItem item = menu.add(0, 0, 0, "Really long menu item name");
103 SubMenu sm = menu.addSubMenu(0, 0, 0, "The 2nd item, a sub menu").setIcon(R.drawable.black_square_stretchable);
105 item.setTitleCondensed("Sub menu");
110 menu.add(0, 0, 0, "Item 3");
111 menu.add(0, 0, 0, "Item 4");
112 menu.add(0, 0, 0, "Item 5");
113 menu
130 onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) argument
184 onOptionsMenuClosed(Menu menu) argument
196 onContextMenuClosed(Menu menu) argument
[all...]
H A DMenuLayout.java41 public boolean onPrepareOptionsMenu(Menu menu) { argument
44 * This activity is meant to try a bunch of different menu layouts. So,
45 * we recreate the menu every time it is prepared.
47 menu.clear();
48 onCreateOptionsMenu(menu);
H A DMenuScenario.java20 import com.android.internal.view.menu.MenuBuilder;
21 import com.android.internal.view.menu.MenuBuilder.MenuAdapter;
32 * number of menu items. Used @link {@link ListScenario} as a reference.
64 public boolean onCreateOptionsMenu(Menu menu) { argument
66 mMenu = menu;
72 if ((item = onAddMenuItem(menu, i)) == null) {
76 item = menu.add(0, 0, 0, (givenTitle != null) ? givenTitle : ("Item " + i));
93 public boolean onPrepareOptionsMenu(Menu menu) { argument
95 mMenu = menu;
101 * Override this to add an item to the menu
108 onAddMenuItem(Menu menu, int itemPosition) argument
[all...]
/frameworks/base/core/java/com/android/internal/view/menu/
H A DMenuView.java17 package com.android.internal.view.menu;
19 import com.android.internal.view.menu.MenuBuilder;
20 import com.android.internal.view.menu.MenuItemImpl;
25 * Minimal interface for a menu view. {@link #initialize(MenuBuilder, int)} must be called for the
26 * menu to be functional.
32 * Initializes the menu to the given menu. This should be called after the
35 * @param menu The menu that this MenuView should display.
36 * @param menuType The type of this menu, on
40 initialize(MenuBuilder menu, int menuType) argument
[all...]
H A DMenuDialogHelper.java17 package com.android.internal.view.menu;
39 public MenuDialogHelper(MenuBuilder menu) { argument
40 mMenu = menu;
44 * Shows menu as a dialog.
50 final MenuBuilder menu = mMenu;
52 // Get an adapter for the menu item views
53 mAdapter = menu.getMenuAdapter(MenuBuilder.TYPE_DIALOG);
56 final AlertDialog.Builder builder = new AlertDialog.Builder(menu.getContext())
60 final View headerView = menu.getHeaderView();
66 builder.setIcon(menu
[all...]
H A DExpandedMenuView.java17 package com.android.internal.view.menu;
30 import com.android.internal.view.menu.MenuBuilder.ItemInvoker;
33 * The expanded menu view is a list-like menu with all of the available menu items. It is opened
34 * by the user clicking no the 'More' button on the icon menu view.
39 /** Default animations for this menu */
44 * @param menu The model for the menu which this MenuView will display
56 public void initialize(MenuBuilder menu, in argument
[all...]
H A DMenuItemImpl.java17 package com.android.internal.view.menu;
19 import com.android.internal.view.menu.MenuView.ItemView;
56 /** The (cached) menu item views for this item */
59 /** The menu to which this item belongs */
61 /** If this item should launch a sub menu, this is the sub menu to launch */
78 * Current use case is for context menu: Extra information linked to the
79 * View that added this item to the context menu.
90 * Instantiates this menu item. The constructor
94 * @param menu
103 MenuItemImpl(MenuBuilder menu, int group, int id, int categoryOrder, int ordering, CharSequence title) argument
[all...]
H A DContextMenuBuilder.java17 package com.android.internal.view.menu;
29 * Most clients of the menu framework will never need to touch this
37 * call {@link #show(View, IBinder)} which will populate the menu
38 * with a view's context menu items and show the context menu.
67 * Shows this context menu, allowing the optional original view (and its
71 * context menu.
73 * menu's window.
74 * @return If the context menu was shown, the {@link MenuDialogHelper} for
80 // the context menu
[all...]
H A DSubMenuBuilder.java17 package com.android.internal.view.menu;
27 * The model for a sub menu, which is an extension of the menu. Most methods are proxied to
28 * the parent menu.
/frameworks/base/telephony/java/com/android/internal/telephony/gsm/stk/
H A DCommandParams.java125 Menu menu = null; field in class:SelectItemParams
128 SelectItemParams(CommandDetails cmdDet, Menu menu, boolean loadTitleIcon) { argument
130 this.menu = menu;
135 if (icon != null && menu != null) {
136 if (loadTitleIcon && menu.titleIcon == null) {
137 menu.titleIcon = icon;
139 for (Item item : menu.items) {
H A DCommandParamsFactory.java510 Menu menu = new Menu();
518 menu.title = ValueParser.retrieveAlphaId(ctlv);
524 menu.items.add(ValueParser.retrieveItem(ctlv));
530 // We must have at least one menu item.
531 if (menu.items.size() == 0) {
539 menu.defaultItem = ValueParser.retrieveItemId(ctlv) - 1;
546 menu.titleIconSelfExplanatory = titleIconId.selfExplanatory;
553 menu.itemsIconSelfExplanatory = itemsIconId.selfExplanatory;
559 menu.presentationType = PresentationType.DATA_VALUES;
561 menu
[all...]
/frameworks/base/tests/FrameworkTest/src/com/android/frameworktest/expandablelistview/
H A DExpandableListSimple.java36 public boolean onCreateOptionsMenu(Menu menu) { argument
38 menu.add("Add item").setOnMenuItemClickListener(new OnMenuItemClickListener() {
/frameworks/base/tests/FrameworkTest/src/com/android/frameworktest/listview/
H A DListWithEmptyView.java74 public boolean onCreateOptionsMenu(Menu menu) { argument
75 super.onCreateOptionsMenu(menu);
76 menu.add(0, MENU_ADD, 0, R.string.menu_add)
78 menu.add(0, MENU_REMOVE, 0, R.string.menu_remove)
/frameworks/base/core/java/android/view/
H A DMenuInflater.java19 import com.android.internal.view.menu.MenuItemImpl;
34 * This class is used to instantiate menu XML files into Menu objects.
36 * For performance reasons, menu inflation relies heavily on pre-processing of
44 private static final String XML_MENU = "menu";
57 * Constructs a menu inflater.
66 * Inflate a menu hierarchy from the specified XML resource. Throws
70 * <code>R.menu.main_activity</code>)
71 * @param menu The Menu to inflate into. The items and submenus will be
74 public void inflate(int menuRes, Menu menu) { argument
80 parseMenu(parser, attrs, menu);
94 parseMenu(XmlPullParser parser, AttributeSet attrs, Menu menu) argument
176 private Menu menu; field in class:MenuInflater.MenuState
217 MenuState(final Menu menu) argument
[all...]
H A DViewParent.java144 * Bring up a context menu for the specified view or its ancestors.
149 * then it should override this and show the context menu.
151 * @param originalView The source view where the context menu was first invoked
152 * @return true if a context menu was displayed
157 * Have the parent populate the specified context menu if it has anything to
160 * @param menu The menu to populate
162 public void createContextMenu(ContextMenu menu); argument
H A DWindow.java55 /** Flag for the context menu. This is enabled by default. */
169 * a menu) will be created for you.
180 * Initialize the contents of the menu for panel 'featureId'. This is
182 * menu in which you can place your items. It is only called once for
185 * <p>You can safely hold on to <var>menu</var> (and any items created
190 * @param menu The menu inside the panel.
195 public boolean onCreatePanelMenu(int featureId, Menu menu); argument
203 * @param menu If onCreatePanelView() returned null, this is the Menu
211 public boolean onPreparePanel(int featureId, View view, Menu menu); argument
223 onMenuOpened(int featureId, Menu menu) argument
285 onPanelClosed(int featureId, Menu menu) argument
[all...]
/frameworks/base/test-runner/android/test/
H A DTestListActivity.java49 /** "Mode" group in the menu. */
61 /** "Regression" menu item */
64 /** "Performance" menu item */
67 /** "Profiling" menu item */
171 public boolean onCreateOptionsMenu(Menu menu) { argument
172 super.onCreateOptionsMenu(menu);
173 mRegressionItem = menu.add(MODE_GROUP, -1, 0, "Regression Mode");
174 mPerformanceItem = menu.add(MODE_GROUP, -1, 0, "Performance Mode");
175 mProfilingItem = menu.add(MODE_GROUP, -1, 0, "Profiling Mode");
176 menu
194 onPrepareOptionsMenu(Menu menu) argument
[all...]
/frameworks/policies/base/mid/com/android/internal/policy/impl/
H A DMidWindow.java19 import com.android.internal.view.menu.ContextMenuBuilder;
20 import com.android.internal.view.menu.MenuBuilder;
21 import com.android.internal.view.menu.MenuDialogHelper;
22 import com.android.internal.view.menu.MenuView;
23 import com.android.internal.view.menu.SubMenuBuilder;
91 * Simple callback used by the context menu and its submenus. The options
92 * menu submenus do not use this (their behavior is more complex).
333 // Init the panel state's menu--return false if init failed
334 if (st.menu == null) {
335 if (!initializePanelMenu(st) || (st.menu
696 findMenuPanel(Menu menu) argument
708 onMenuItemSelected(MenuBuilder menu, MenuItem item) argument
719 onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing) argument
751 onMenuModeChange(MenuBuilder menu) argument
2334 callOnPanelClosed(int featureId, PanelFeatureState panel, Menu menu) argument
2440 Menu menu; field in class:MidWindow.PanelFeatureState
2489 setMenu(Menu menu) argument
2592 onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing) argument
2603 onCloseSubMenu(SubMenuBuilder menu) argument
2608 onMenuItemSelected(MenuBuilder menu, MenuItem item) argument
2614 onMenuModeChange(MenuBuilder menu) argument
[all...]
/frameworks/policies/base/phone/com/android/internal/policy/impl/
H A DPhoneWindow.java25 import com.android.internal.view.menu.ContextMenuBuilder;
26 import com.android.internal.view.menu.MenuBuilder;
27 import com.android.internal.view.menu.MenuDialogHelper;
28 import com.android.internal.view.menu.MenuView;
29 import com.android.internal.view.menu.SubMenuBuilder;
93 * Simple callback used by the context menu and its submenus. The options
94 * menu submenus do not use this (their behavior is more complex).
299 // Init the panel state's menu--return false if init failed
300 if (st.menu == null) {
301 if (!initializePanelMenu(st) || (st.menu
713 findMenuPanel(Menu menu) argument
725 onMenuItemSelected(MenuBuilder menu, MenuItem item) argument
736 onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing) argument
768 onMenuModeChange(MenuBuilder menu) argument
2443 callOnPanelClosed(int featureId, PanelFeatureState panel, Menu menu) argument
2550 Menu menu; field in class:PhoneWindow.PanelFeatureState
2603 setMenu(Menu menu) argument
2707 onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing) argument
2724 onCloseSubMenu(SubMenuBuilder menu) argument
2729 onMenuItemSelected(MenuBuilder menu, MenuItem item) argument
2734 onMenuModeChange(MenuBuilder menu) argument
[all...]
/frameworks/base/core/java/android/app/
H A DDialog.java688 public boolean onCreatePanelMenu(int featureId, Menu menu) { argument
690 return onCreateOptionsMenu(menu);
699 public boolean onPreparePanel(int featureId, View view, Menu menu) { argument
700 if (featureId == Window.FEATURE_OPTIONS_PANEL && menu != null) {
701 boolean goforit = onPrepareOptionsMenu(menu);
702 return goforit && menu.hasVisibleItems();
710 public boolean onMenuOpened(int featureId, Menu menu) { argument
724 public void onPanelClosed(int featureId, Menu menu) { argument
730 * menu for this Dialog.
735 public boolean onCreateOptionsMenu(Menu menu) { argument
747 onPrepareOptionsMenu(Menu menu) argument
761 onOptionsMenuClosed(Menu menu) argument
781 onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) argument
815 onContextMenuClosed(Menu menu) argument
[all...]
H A DActivity.java1674 * Use with {@link #setDefaultKeyMode} to execute a menu shortcut in
1677 * <p>That is, the user does not need to hold down the menu key to execute menu shortcuts.
1710 * menu without requiring the menu key be held down
1715 * handling of system keys, such as the "back" and "menu" keys, and your
2107 * menu behavior.
2121 public boolean onCreatePanelMenu(int featureId, Menu menu) { argument
2123 return onCreateOptionsMenu(menu);
2137 public boolean onPreparePanel(int featureId, View view, Menu menu) { argument
2150 onMenuOpened(int featureId, Menu menu) argument
2190 onPanelClosed(int featureId, Menu menu) argument
2230 onCreateOptionsMenu(Menu menu) argument
2255 onPrepareOptionsMenu(Menu menu) argument
2294 onOptionsMenuClosed(Menu menu) argument
2329 onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) argument
2406 onContextMenuClosed(Menu menu) argument
[all...]
H A DExpandableListActivity.java164 * Override this to populate the context menu when an item is long pressed. menuInfo
173 public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) { argument
/frameworks/base/tests/FrameworkTest/tests/src/com/android/frameworktest/menus/
H A DMenuWith1ItemTest.java21 import com.android.internal.view.menu.MenuBuilder;
53 // Open menu, click on an item
64 // open menu, move around to give it focus
69 // close the menu
78 // open the menu, menu item shouldn't be focused, because we are not
H A DMenuLayoutLandscapeTest.java20 import com.android.internal.view.menu.IconMenuView;
21 import com.android.internal.view.menu.MenuBuilder;
53 * Asserts the layout of the menu.
H A DMenuLayoutPortraitTest.java20 import com.android.internal.view.menu.IconMenuView;
21 import com.android.internal.view.menu.MenuBuilder;
53 * Asserts the layout of the menu.

Completed in 418 milliseconds

12