/frameworks/base/core/tests/coretests/src/android/view/menu/ |
H A D | MenuLayoutLandscape.java | 17 package android.view.menu;
|
H A D | MenuLayoutPortrait.java | 17 package android.view.menu;
|
H A D | MenuLayout.java | 17 package android.view.menu; 19 import android.view.menu.MenuScenario.Params; 41 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 D | MenuScenario.java | 17 package android.view.menu; 20 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; 108 onAddMenuItem(Menu menu, int itemPosition) argument [all...] |
H A D | MenuWith1Item.java | 17 package android.view.menu;
|
H A D | MenuWith1ItemTest.java | 17 package android.view.menu; 19 import android.view.menu.MenuWith1Item; 21 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 D | MenuLayoutLandscapeTest.java | 17 package android.view.menu; 20 import com.android.internal.view.menu.IconMenuView; 21 import com.android.internal.view.menu.MenuBuilder; 53 * Asserts the layout of the menu.
|
H A D | MenuLayoutPortraitTest.java | 17 package android.view.menu; 20 import com.android.internal.view.menu.IconMenuView; 21 import com.android.internal.view.menu.MenuBuilder; 53 * Asserts the layout of the menu.
|
/frameworks/base/core/tests/coretests/src/android/view/ |
H A D | ListContextMenu.java | 98 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...] |
/frameworks/base/core/java/com/android/internal/view/menu/ |
H A D | MenuView.java | 17 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 D | MenuDialogHelper.java | 17 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 D | ExpandedMenuView.java | 17 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 D | MenuItemImpl.java | 17 package com.android.internal.view.menu; 33 import com.android.internal.view.menu.MenuView.ItemView; 60 /** The (cached) menu item views for this item */ 63 /** The menu to which this item belongs */ 65 /** If this item should launch a sub menu, this is the sub menu to launch */ 82 * Current use case is for context menu: Extra information linked to the 83 * View that added this item to the context menu. 94 * Instantiates this menu item. The constructor 98 * @param menu 107 MenuItemImpl(MenuBuilder menu, int group, int id, int categoryOrder, int ordering, CharSequence title) argument [all...] |
H A D | ContextMenuBuilder.java | 17 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...] |
/frameworks/base/core/tests/coretests/src/android/widget/expandablelistview/ |
H A D | ExpandableListSimple.java | 36 public boolean onCreateOptionsMenu(Menu menu) { argument 38 menu.add("Add item").setOnMenuItemClickListener(new OnMenuItemClickListener() {
|
/frameworks/base/telephony/java/com/android/internal/telephony/gsm/stk/ |
H A D | CommandParams.java | 125 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 D | CommandParamsFactory.java | 510 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/core/tests/coretests/src/android/widget/listview/ |
H A D | ListWithEmptyView.java | 74 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 D | MenuInflater.java | 19 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 D | ViewParent.java | 144 * 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
|
/frameworks/base/test-runner/src/android/test/ |
H A D | TestListActivity.java | 49 /** "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/base/core/java/android/app/ |
H A D | Dialog.java | 687 public boolean onCreatePanelMenu(int featureId, Menu menu) { argument 689 return onCreateOptionsMenu(menu); 698 public boolean onPreparePanel(int featureId, View view, Menu menu) { argument 699 if (featureId == Window.FEATURE_OPTIONS_PANEL && menu != null) { 700 boolean goforit = onPrepareOptionsMenu(menu); 701 return goforit && menu.hasVisibleItems(); 709 public boolean onMenuOpened(int featureId, Menu menu) { argument 723 public void onPanelClosed(int featureId, Menu menu) { argument 729 * menu for this Dialog. 734 public boolean onCreateOptionsMenu(Menu menu) { argument 746 onPrepareOptionsMenu(Menu menu) argument 760 onOptionsMenuClosed(Menu menu) argument 780 onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) argument 814 onContextMenuClosed(Menu menu) argument [all...] |
H A D | Activity.java | 1709 * Use with {@link #setDefaultKeyMode} to execute a menu shortcut in 1712 * <p>That is, the user does not need to hold down the menu key to execute menu shortcuts. 1745 * menu without requiring the menu key be held down 1750 * handling of system keys, such as the "back" and "menu" keys, and your 2142 * menu behavior. 2156 public boolean onCreatePanelMenu(int featureId, Menu menu) { argument 2158 return onCreateOptionsMenu(menu); 2172 public boolean onPreparePanel(int featureId, View view, Menu menu) { argument 2185 onMenuOpened(int featureId, Menu menu) argument 2225 onPanelClosed(int featureId, Menu menu) argument 2265 onCreateOptionsMenu(Menu menu) argument 2290 onPrepareOptionsMenu(Menu menu) argument 2329 onOptionsMenuClosed(Menu menu) argument 2364 onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) argument 2441 onContextMenuClosed(Menu menu) argument [all...] |
/frameworks/base/policy/src/com/android/internal/policy/impl/ |
H A D | PhoneWindow.java | 27 import com.android.internal.view.menu.ContextMenuBuilder; 28 import com.android.internal.view.menu.MenuBuilder; 29 import com.android.internal.view.menu.MenuDialogHelper; 30 import com.android.internal.view.menu.MenuView; 31 import com.android.internal.view.menu.SubMenuBuilder; 95 * Simple callback used by the context menu and its submenus. The options 96 * menu submenus do not use this (their behavior is more complex). 317 // Init the panel state's menu--return false if init failed 318 if (st.menu == null) { 319 if (!initializePanelMenu(st) || (st.menu 731 findMenuPanel(Menu menu) argument 743 onMenuItemSelected(MenuBuilder menu, MenuItem item) argument 754 onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing) argument 786 onMenuModeChange(MenuBuilder menu) argument 2497 callOnPanelClosed(int featureId, PanelFeatureState panel, Menu menu) argument 2604 Menu menu; field in class:PhoneWindow.PanelFeatureState 2657 setMenu(Menu menu) argument 2761 onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing) argument 2778 onCloseSubMenu(SubMenuBuilder menu) argument 2783 onMenuItemSelected(MenuBuilder menu, MenuItem item) argument 2788 onMenuModeChange(MenuBuilder menu) argument [all...] |
/frameworks/base/tests/LocationTracker/src/com/android/locationtracker/ |
H A D | TrackerActivity.java | 52 * - enable/disable "start service" and "stop service" menu items as 75 * Builds the menu 77 * @param menu - menu to add items to 80 public boolean onCreateOptionsMenu(Menu menu) { argument 82 menuInflater.inflate(R.menu.menu, menu); 87 * Handles menu item selection 89 * @param item - the selected menu ite [all...] |