/frameworks/base/core/tests/coretests/src/android/view/ |
MenuTest.java | 29 private MenuBuilder mMenu; 33 mMenu = new MenuBuilder(super.getContext()); 39 final MenuItem item = mMenu.add(0, id, 0, "test"); 42 Assert.assertEquals(item, mMenu.findItem(id)); 43 Assert.assertEquals(0, mMenu.findItemIndex(id)); 52 mMenu.add(0, 0, item1Index - 1, "ignore"); 53 final MenuItem item = mMenu.add(groupId, 0, item1Index, "test"); 54 mMenu.add(0, 0, item2Index - 1, "ignore"); 55 final MenuItem item2 = mMenu.add(groupId, 0, item2Index, "test2"); 59 Assert.assertEquals(item1Index, mMenu.findGroupIndex(groupId)) [all...] |
/cts/tests/tests/view/src/android/view/cts/ |
MenuTest.java | 47 private Menu mMenu; 58 mMenu = new PopupMenu(mActivity, null).getMenu(); 64 mMenuInflater.inflate(R.menu.shortcut_modifiers, mMenu); 65 mMenu.setQwertyMode(true); 73 assertTrue(mMenu.performShortcut(keyCodeToSend, keyEventToSend, 0)); 75 mMenu.findItem(R.id.no_modifiers).getItemId()); 81 assertTrue(mMenu.performShortcut(keyCodeToSend, keyEventToSend, 0)); 83 mMenu.findItem(R.id.default_modifiers).getItemId()); 89 assertTrue(mMenu.performShortcut(keyCodeToSend, keyEventToSend, 0)); 91 mMenu.findItem(R.id.single_modifier).getItemId()) [all...] |
MenuInflaterTest.java | 56 private Menu mMenu; 67 mMenu = new PopupMenu(mActivity, null).getMenu(); 79 assertEquals(0, mMenu.size()); 81 mMenuInflater.inflate(R.menu.browser, mMenu); 82 assertEquals(1, mMenu.size()); 88 mMenuInflater.inflate(0, mMenu); 102 mMenuInflater.inflate(R.menu.visible_shortcut, mMenu); 104 assertTrue(mMenu.findItem(R.id.visible_item).isVisible()); 105 assertEquals('a', mMenu.findItem(R.id.visible_item).getAlphabeticShortcut()); 107 assertFalse(mMenu.findItem(R.id.hidden_item).isVisible()) [all...] |
MenuItemTest.java | 45 private Menu mMenu; 59 mMenu = mActivity.getMainToolbar().getMenu(); 69 MenuItem firstItem = mMenu.getItem(0); 70 MenuItem secondItem = mMenu.getItem(1); 71 MenuItem thirdItem = mMenu.getItem(2);
|
/packages/apps/TV/tests/unit/src/com/android/tv/menu/ |
MenuTest.java | 38 private Menu mMenu; 49 mMenu = new Menu(getTargetContext(), mMenuView, factory, mVisibilityChangeListener); 50 mMenu.disableAnimationForTest(); 55 mMenu.show(Menu.REASON_NONE); 57 assertTrue("Hide is not scheduled", mMenu.isHideScheduled()); 58 mMenu.hide(false); 60 assertFalse("Hide is scheduled", mMenu.isHideScheduled()); 62 mMenu.setKeepVisible(true); 63 mMenu.show(Menu.REASON_NONE); 65 assertFalse("Hide is scheduled", mMenu.isHideScheduled()) [all...] |
/art/tools/ahat/src/ |
Menu.java | 23 private static DocString mMenu = 34 return mMenu;
|
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/ |
SubmenuAction.java | 18 private Menu mMenu; 31 if (mMenu != null) { 32 mMenu.dispose(); 33 mMenu = null; 44 mMenu = new Menu(parent); 45 mMenu.addMenuListener(this); 46 return mMenu; 58 MenuItem[] menuItems = mMenu.getItems(); 62 addMenuItems(mMenu); 72 new ActionContributionItem(action).fill(mMenu, -1) [all...] |
/packages/apps/Settings/tests/robotests/src/com/android/settings/deviceinfo/ |
PrivateVolumeOptionMenuControllerTest.java | 51 private Menu mMenu; 69 when(mMenu.findItem(anyInt())).thenReturn(mMigrateMenuItem); 78 mController.onCreateOptionsMenu(mMenu, mMenuInflater); 80 verify(mMenu).add(Menu.NONE, 100, Menu.NONE, R.string.storage_menu_migrate); 87 mController.onCreateOptionsMenu(mMenu, mMenuInflater); 88 mController.onPrepareOptionsMenu(mMenu); 97 mController.onCreateOptionsMenu(mMenu, mMenuInflater); 98 mController.onPrepareOptionsMenu(mMenu); 107 mController.onCreateOptionsMenu(mMenu, mMenuInflater); 108 mController.onPrepareOptionsMenu(mMenu); [all...] |
/packages/apps/TV/src/com/android/tv/menu/ |
MenuRow.java | 32 private final Menu mMenu; 44 mMenu = menu; 59 return mMenu;
|
MenuUpdater.java | 36 private final Menu mMenu; 48 mMenu.update(ChannelsRow.ID); 56 mMenu.update(ChannelsRow.ID); 62 mMenu.update(TvOptionsRow.ID); 67 mMenu = menu; 74 mMenu.update(PlayControlsRow.ID); 105 mMenu.update(TvOptionsRow.ID);
|
/frameworks/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/ |
OverflowMenuAdapter.java | 37 private final MenuBuilder mMenu; 42 mMenu = menu; 49 ArrayList<MenuItemImpl> items = mMenu.getNonActionItems(); 58 ArrayList<MenuItemImpl> items = mMenu.getNonActionItems(); 86 final MenuItemImpl expandedItem = mMenu.getExpandedItem(); 88 final ArrayList<MenuItemImpl> items = mMenu.getNonActionItems();
|
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/editors/ |
SwapButton.java | 38 private Menu mMenu; 87 if (mMenu == null) { 93 if (mCurrentMenuIndex == mMenu.size()) { 97 mListener.swapRight(mMenu.getItem(mCurrentMenuIndex)); 103 mCurrentMenuIndex = mMenu.size() - 1; 106 mListener.swapLeft(mMenu.getItem(mCurrentMenuIndex));
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/network/ |
NetworkResetActionMenuControllerTest.java | 49 private Menu mMenu; 61 when(mMenu.add(anyInt(), anyInt(), anyInt(), anyInt())).thenReturn(mMenuItem); 67 mController.buildMenuItem(mMenu); 69 verify(mMenu).add(anyInt(), anyInt(), anyInt(), anyInt()); 77 mController.buildMenuItem(mMenu); 79 verify(mMenu, never()).add(anyInt(), anyInt(), anyInt(), anyInt());
|
/cts/tests/app/src/android/app/cts/ |
ActivityKeyboardShortcutsTest.java | 37 private Menu mMenu; 47 mMenu = new PopupMenu(mActivity, null).getMenu(); 79 mActivity.onCreateOptionsMenu(mMenu); 80 mActivity.onProvideKeyboardShortcuts(data, mMenu, -1);
|
/frameworks/support/v7/appcompat/tests/src/android/support/v7/view/ |
SupportMenuInflaterTest.java | 44 private Menu mMenu; 54 mMenu = new PopupMenu(mActivity, null).getMenu(); 59 mMenuInflater.inflate(R.menu.shortcut, mMenu); 62 mMenuItem = (SupportMenuItem) mMenu.findItem(R.id.no_modifiers); 68 mMenuItem = (SupportMenuItem) mMenu.findItem(R.id.default_modifiers); 74 mMenuItem = (SupportMenuItem) mMenu.findItem(R.id.single_modifier); 80 mMenuItem = (SupportMenuItem) mMenu.findItem(R.id.multiple_modifiers);
|
/frameworks/base/core/java/com/android/internal/view/menu/ |
MenuItemImpl.java | 77 private MenuBuilder mMenu; 147 mMenu = menu; 167 if (mMenu.dispatchMenuItemSelected(mMenu, this)) { 178 mMenu.getContext().startActivity(mIntent); 203 mMenu.onItemsChanged(false); 259 mMenu.onItemsChanged(false); 274 mMenu.onItemsChanged(false); 295 mMenu.onItemsChanged(false); 309 mMenu.onItemsChanged(false) [all...] |
MenuDialogHelper.java | 34 private MenuBuilder mMenu; 40 mMenu = menu; 49 // Many references to mMenu, create local reference 50 final MenuBuilder menu = mMenu; 59 mMenu.addMenuPresenter(mPresenter); 111 mMenu.close(true /* closeAllMenus */); 121 return mMenu.performShortcut(keyCode, event, 0); 144 mPresenter.onCloseMenu(mMenu, true); 149 if (allMenusAreClosing || menu == mMenu) { 166 mMenu.performItemAction((MenuItemImpl) mPresenter.getAdapter().getItem(which), 0) [all...] |
ExpandedMenuView.java | 35 private MenuBuilder mMenu; 55 mMenu = menu; 67 return mMenu.performItemAction(item, 0);
|
BaseMenuPresenter.java | 36 protected MenuBuilder mMenu; 66 mMenu = menu; 73 mMenuView.initialize(mMenu); 88 if (mMenu != null) { 89 mMenu.flagActionItems(); 90 ArrayList<MenuItemImpl> visibleItems = mMenu.getVisibleItems();
|
/frameworks/support/v7/appcompat/src/android/support/v7/view/menu/ |
MenuItemImpl.java | 79 MenuBuilder mMenu; 152 mMenu = menu; 171 if (mMenu.dispatchMenuItemSelected(mMenu, this)) { 182 mMenu.getContext().startActivity(mIntent); 209 mMenu.onItemsChanged(false); 267 mMenu.onItemsChanged(false); 282 mMenu.onItemsChanged(false); 309 mMenu.onItemsChanged(false); 323 mMenu.onItemsChanged(false) [all...] |
MenuDialogHelper.java | 36 private MenuBuilder mMenu; 42 mMenu = menu; 51 // Many references to mMenu, create local reference 52 final MenuBuilder menu = mMenu; 61 mMenu.addMenuPresenter(mPresenter); 114 mMenu.close(true); 124 return mMenu.performShortcut(keyCode, event, 0); 145 mPresenter.onCloseMenu(mMenu, true); 150 if (allMenusAreClosing || menu == mMenu) { 168 mMenu.performItemAction((MenuItemImpl) mPresenter.getAdapter().getItem(which), 0) [all...] |
/frameworks/base/core/java/android/widget/ |
PopupMenu.java | 43 private final MenuBuilder mMenu; 100 mMenu = new MenuBuilder(context); 101 mMenu.setCallback(new MenuBuilder.Callback() { 115 mPopup = new MenuPopupHelper(context, mMenu, anchor, false, popupStyleAttr, popupStyleRes); 199 return mMenu; 218 getMenuInflater().inflate(menuRes, mMenu);
|
/frameworks/support/design/src/android/support/design/internal/ |
BottomNavigationMenuView.java | 67 private MenuBuilder mMenu; 95 if (!mMenu.performItemAction(item, mPresenter, 0)) { 105 mMenu = menu; 263 if (mMenu.size() == 0) { 269 mButtons = new BottomNavigationItemView[mMenu.size()]; 270 mShiftingMode = mMenu.size() > 3; 271 for (int i = 0; i < mMenu.size(); i++) { 273 mMenu.getItem(i).setCheckable(true); 281 child.initialize((MenuItemImpl) mMenu.getItem(i), 0); 286 mSelectedItemPosition = Math.min(mMenu.size() - 1, mSelectedItemPosition) [all...] |
/development/samples/ApiDemos/src/com/example/android/apis/app/ |
MenuInflateFromXml.java | 72 private Menu mMenu; 126 mMenu = menu; 157 final boolean shouldShowBrowser = !mMenu.findItem(R.id.refresh).isVisible(); 158 mMenu.setGroupVisible(R.id.browser, shouldShowBrowser); 163 final boolean shouldShowEmail = !mMenu.findItem(R.id.reply).isVisible(); 164 mMenu.setGroupVisible(R.id.email, shouldShowEmail);
|
/frameworks/opt/telephony/src/java/com/android/internal/telephony/cat/ |
CommandParams.java | 154 Menu mMenu = null; 159 mMenu = menu; 165 if (icon != null && mMenu != null) { 166 if (mLoadTitleIcon && mMenu.titleIcon == null) { 167 mMenu.titleIcon = icon; 169 for (Item item : mMenu.items) {
|