Home
last modified time | relevance | path

Searched refs:menu (Results 1 – 25 of 257) sorted by relevance

1234567891011

/frameworks/base/core/tests/coretests/src/android/view/
DListContextMenu.java98 public boolean onCreateOptionsMenu(Menu menu) { in onCreateOptionsMenu() argument
99 MenuItem item = menu.add(0, 0, 0, "Really long menu item name"); in onCreateOptionsMenu()
103 …SubMenu sm = menu.addSubMenu(0, 0, 0, "The 2nd item, a sub menu").setIcon(R.drawable.black_square_… in onCreateOptionsMenu()
110 menu.add(0, 0, 0, "Item 3"); in onCreateOptionsMenu()
111 menu.add(0, 0, 0, "Item 4"); in onCreateOptionsMenu()
112 menu.add(0, 0, 0, "Item 5"); in onCreateOptionsMenu()
113 menu.add(0, 0, 0, "Item 6"); in onCreateOptionsMenu()
114 menu.add(0, 0, 0, "Item 7"); in onCreateOptionsMenu()
115 menu.add(0, 0, 0, "Item 8"); in onCreateOptionsMenu()
116 menu.add(0, 0, 0, "Item 9"); in onCreateOptionsMenu()
[all …]
/frameworks/base/core/java/com/android/internal/view/menu/
DCascadingMenuPopup.java1 package com.android.internal.view.menu;
121 public void onItemHoverExit(@NonNull MenuBuilder menu, @NonNull MenuItem item) {
125 mSubMenuHoverHandler.removeCallbacksAndMessages(menu);
130 @NonNull final MenuBuilder menu, @NonNull final MenuItem item) {
137 if (menu == mShowingMenus.get(i).menu) {
164 nextInfo.menu.close(false /* closeAllMenus */);
170 menu.performItemAction(item, 0);
175 mSubMenuHoverHandler.postAtTime(runnable, menu, uptimeMillis);
245 for (MenuBuilder menu : mPendingMenus) { in show()
246 showMenu(menu); in show()
[all …]
DMenuDialogHelper.java17 package com.android.internal.view.menu;
39 public MenuDialogHelper(MenuBuilder menu) { in MenuDialogHelper() argument
40 mMenu = menu; in MenuDialogHelper()
50 final MenuBuilder menu = mMenu; in show() local
53 final AlertDialog.Builder builder = new AlertDialog.Builder(menu.getContext()); in show()
63 final View headerView = menu.getHeaderView(); in show()
69 builder.setIcon(menu.getHeaderIcon()).setTitle(menu.getHeaderTitle()); in show()
148 public void onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing) { in onCloseMenu() argument
149 if (allMenusAreClosing || menu == mMenu) { in onCloseMenu()
153 mPresenterCallback.onCloseMenu(menu, allMenusAreClosing); in onCloseMenu()
DMenuPresenter.java17 package com.android.internal.view.menu;
39 public void onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing); in onCloseMenu() argument
63 public void initForMenu(@NonNull Context context, @Nullable MenuBuilder menu); in initForMenu() argument
109 public void onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing); in onCloseMenu() argument
124 public boolean expandItemActionView(MenuBuilder menu, MenuItemImpl item); in expandItemActionView() argument
133 public boolean collapseItemActionView(MenuBuilder menu, MenuItemImpl item); in collapseItemActionView() argument
DBaseMenuPresenter.java17 package com.android.internal.view.menu;
63 public void initForMenu(@NonNull Context context, @Nullable MenuBuilder menu) { in initForMenu() argument
66 mMenu = menu; in initForMenu()
203 public void onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing) { in onCloseMenu() argument
205 mCallback.onCloseMenu(menu, allMenusAreClosing); in onCloseMenu()
209 public boolean onSubMenuSelected(SubMenuBuilder menu) { in onSubMenuSelected() argument
211 return mCallback.onOpenSubMenu(menu); in onSubMenuSelected()
220 public boolean expandItemActionView(MenuBuilder menu, MenuItemImpl item) { in expandItemActionView() argument
224 public boolean collapseItemActionView(MenuBuilder menu, MenuItemImpl item) { in collapseItemActionView() argument
/frameworks/support/v7/appcompat/src/android/support/v7/view/menu/
DCascadingMenuPopup.java17 package android.support.v7.view.menu;
137 public void onItemHoverExit(@NonNull MenuBuilder menu, @NonNull MenuItem item) {
141 mSubMenuHoverHandler.removeCallbacksAndMessages(menu);
146 @NonNull final MenuBuilder menu, @NonNull final MenuItem item) {
153 if (menu == mShowingMenus.get(i).menu) {
180 nextInfo.menu.close(false /* closeAllMenus */);
186 menu.performItemAction(item, SupportMenu.FLAG_KEEP_OPEN_ON_SUBMENU_OPENED);
191 mSubMenuHoverHandler.postAtTime(runnable, menu, uptimeMillis);
261 for (MenuBuilder menu : mPendingMenus) { in show()
262 showMenu(menu); in show()
[all …]
DMenuDialogHelper.java17 package android.support.v7.view.menu;
41 public MenuDialogHelper(MenuBuilder menu) { in MenuDialogHelper() argument
42 mMenu = menu; in MenuDialogHelper()
52 final MenuBuilder menu = mMenu; in show() local
55 final AlertDialog.Builder builder = new AlertDialog.Builder(menu.getContext()); in show()
65 final View headerView = menu.getHeaderView(); in show()
71 builder.setIcon(menu.getHeaderIcon()).setTitle(menu.getHeaderTitle()); in show()
149 public void onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing) { in onCloseMenu() argument
150 if (allMenusAreClosing || menu == mMenu) { in onCloseMenu()
154 mPresenterCallback.onCloseMenu(menu, allMenusAreClosing); in onCloseMenu()
DMenuPresenter.java17 package android.support.v7.view.menu;
44 void onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing); in onCloseMenu() argument
68 void initForMenu(Context context, MenuBuilder menu); in initForMenu() argument
114 void onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing); in onCloseMenu() argument
129 boolean expandItemActionView(MenuBuilder menu, MenuItemImpl item); in expandItemActionView() argument
138 boolean collapseItemActionView(MenuBuilder menu, MenuItemImpl item); in collapseItemActionView() argument
DBaseMenuPresenter.java17 package android.support.v7.view.menu;
68 public void initForMenu(Context context, MenuBuilder menu) { in initForMenu() argument
71 mMenu = menu; in initForMenu()
211 public void onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing) { in onCloseMenu() argument
213 mCallback.onCloseMenu(menu, allMenusAreClosing); in onCloseMenu()
218 public boolean onSubMenuSelected(SubMenuBuilder menu) { in onSubMenuSelected() argument
220 return mCallback.onOpenSubMenu(menu); in onSubMenuSelected()
231 public boolean expandItemActionView(MenuBuilder menu, MenuItemImpl item) { in expandItemActionView() argument
236 public boolean collapseItemActionView(MenuBuilder menu, MenuItemImpl item) { in collapseItemActionView() argument
DMenuPopup.java17 package android.support.v7.view.menu;
53 public abstract void addMenu(MenuBuilder menu); in addMenu() argument
96 public void initForMenu(@NonNull Context context, @Nullable MenuBuilder menu) { in initForMenu() argument
106 public boolean expandItemActionView(MenuBuilder menu, MenuItemImpl item) { in expandItemActionView() argument
111 public boolean collapseItemActionView(MenuBuilder menu, MenuItemImpl item) { in collapseItemActionView() argument
200 protected static boolean shouldPreserveIconSpacing(MenuBuilder menu) { in shouldPreserveIconSpacing() argument
202 final int count = menu.size(); in shouldPreserveIconSpacing()
205 MenuItem childItem = menu.getItem(i); in shouldPreserveIconSpacing()
/frameworks/support/design/src/android/support/design/internal/
DBottomNavigationPresenter.java26 import android.support.v7.view.menu.MenuBuilder;
27 import android.support.v7.view.menu.MenuItemImpl;
28 import android.support.v7.view.menu.MenuPresenter;
29 import android.support.v7.view.menu.MenuView;
30 import android.support.v7.view.menu.SubMenuBuilder;
48 public void initForMenu(Context context, MenuBuilder menu) { in initForMenu() argument
50 mMenu = menu; in initForMenu()
77 public void onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing) {} in onCloseMenu() argument
85 public boolean expandItemActionView(MenuBuilder menu, MenuItemImpl item) { in expandItemActionView() argument
90 public boolean collapseItemActionView(MenuBuilder menu, MenuItemImpl item) { in collapseItemActionView() argument
DNavigationSubMenu.java23 import android.support.v7.view.menu.MenuBuilder;
24 import android.support.v7.view.menu.MenuItemImpl;
25 import android.support.v7.view.menu.SubMenuBuilder;
36 public NavigationSubMenu(Context context, NavigationMenu menu, MenuItemImpl item) { in NavigationSubMenu() argument
37 super(context, menu, item); in NavigationSubMenu()
/frameworks/base/core/java/android/view/
DWindowCallbackWrapper.java77 public boolean onCreatePanelMenu(int featureId, Menu menu) { in onCreatePanelMenu() argument
78 return mWrapped.onCreatePanelMenu(featureId, menu); in onCreatePanelMenu()
82 public boolean onPreparePanel(int featureId, View view, Menu menu) { in onPreparePanel() argument
83 return mWrapped.onPreparePanel(featureId, view, menu); in onPreparePanel()
87 public boolean onMenuOpened(int featureId, Menu menu) { in onMenuOpened() argument
88 return mWrapped.onMenuOpened(featureId, menu); in onMenuOpened()
122 public void onPanelClosed(int featureId, Menu menu) { in onPanelClosed() argument
123 mWrapped.onPanelClosed(featureId, menu); in onPanelClosed()
158 List<KeyboardShortcutGroup> data, Menu menu, int deviceId) { in onProvideKeyboardShortcuts() argument
159 mWrapped.onProvideKeyboardShortcuts(data, menu, deviceId); in onProvideKeyboardShortcuts()
/frameworks/support/samples/Support7Demos/src/com/example/android/supportv7/app/
DActionBarUsage.java50 public boolean onCreateOptionsMenu(Menu menu) { in onCreateOptionsMenu() argument
52 inflater.inflate(R.menu.actions, menu); in onCreateOptionsMenu()
53 SearchView searchView = (SearchView) menu.findItem(R.id.action_search).getActionView(); in onCreateOptionsMenu()
55 final MenuItem editItem = menu.findItem(R.id.action_edit); in onCreateOptionsMenu()
64 public boolean onPrepareOptionsMenu(Menu menu) { in onPrepareOptionsMenu() argument
66 Drawable icon = menu.findItem(mSortMode).getIcon(); in onPrepareOptionsMenu()
67 menu.findItem(R.id.action_sort).setIcon(icon); in onPrepareOptionsMenu()
69 return super.onPrepareOptionsMenu(menu); in onPrepareOptionsMenu()
DActionBarFragmentMenu.java137 public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) { in onCreateOptionsMenu() argument
138 menu.add("Menu 1a").setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM); in onCreateOptionsMenu()
139 menu.add("Menu 1b").setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM); in onCreateOptionsMenu()
140 super.onCreateOptionsMenu(menu, inflater); in onCreateOptionsMenu()
179 public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) { in onCreateOptionsMenu() argument
180 menu.add("Menu 2").setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM); in onCreateOptionsMenu()
205 public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) { in onCreateOptionsMenu() argument
208 inflater.inflate(R.menu.display_options_actions, menu); in onCreateOptionsMenu()
209 super.onCreateOptionsMenu(menu, inflater); in onCreateOptionsMenu()
220 public void onPrepareOptionsMenu(Menu menu) { in onPrepareOptionsMenu() argument
[all …]
DActionBarShareActionProvider.java34 public boolean onCreateOptionsMenu(Menu menu) { in onCreateOptionsMenu() argument
35 getMenuInflater().inflate(R.menu.action_bar_share_action_provider, menu); in onCreateOptionsMenu()
40 protected boolean onPrepareOptionsPanel(View view, Menu menu) { in onPrepareOptionsPanel() argument
42 menu.findItem(R.id.menu_item_share_provider_action_bar)); in onPrepareOptionsPanel()
/frameworks/base/core/java/com/android/internal/app/
DToolbarActionBar.java20 import com.android.internal.view.menu.MenuBuilder;
21 import com.android.internal.view.menu.MenuPresenter;
447 final Menu menu = mDecorToolbar.getMenu(); in populateOptionsMenu() local
448 final MenuBuilder mb = menu instanceof MenuBuilder ? (MenuBuilder) menu : null; in populateOptionsMenu()
453 menu.clear(); in populateOptionsMenu()
454 if (!mWindowCallback.onCreatePanelMenu(Window.FEATURE_OPTIONS_PANEL, menu) || in populateOptionsMenu()
455 !mWindowCallback.onPreparePanel(Window.FEATURE_OPTIONS_PANEL, null, menu)) { in populateOptionsMenu()
456 menu.clear(); in populateOptionsMenu()
475 Menu menu = mDecorToolbar.getMenu(); in onKeyShortcut() local
476 if (menu != null) { in onKeyShortcut()
[all …]
/frameworks/support/v7/appcompat/src/android/support/v7/app/
DToolbarActionBar.java25 import android.support.v7.view.menu.ListMenuPresenter;
26 import android.support.v7.view.menu.MenuBuilder;
27 import android.support.v7.view.menu.MenuPresenter;
448 final Menu menu = getMenu(); in populateOptionsMenu() local
449 final MenuBuilder mb = menu instanceof MenuBuilder ? (MenuBuilder) menu : null; in populateOptionsMenu()
454 menu.clear(); in populateOptionsMenu()
455 if (!mWindowCallback.onCreatePanelMenu(Window.FEATURE_OPTIONS_PANEL, menu) || in populateOptionsMenu()
456 !mWindowCallback.onPreparePanel(Window.FEATURE_OPTIONS_PANEL, null, menu)) { in populateOptionsMenu()
457 menu.clear(); in populateOptionsMenu()
476 Menu menu = getMenu(); in onKeyShortcut() local
[all …]
DAppCompatDelegateImplBase.java30 import android.support.v7.view.menu.MenuBuilder;
165 abstract void onPanelClosed(int featureId, Menu menu);
167 abstract boolean onMenuOpened(int featureId, Menu menu);
326 public boolean onCreatePanelMenu(int featureId, Menu menu) {
327 if (featureId == Window.FEATURE_OPTIONS_PANEL && !(menu instanceof MenuBuilder)) {
332 return super.onCreatePanelMenu(featureId, menu);
342 public boolean onPreparePanel(int featureId, View view, Menu menu) {
343 final MenuBuilder mb = menu instanceof MenuBuilder ? (MenuBuilder) menu : null;
359 final boolean handled = super.onPreparePanel(featureId, view, menu);
369 public boolean onMenuOpened(int featureId, Menu menu) {
[all …]
DAppCompatDelegateImplV9.java54 import android.support.v7.view.menu.ListMenuPresenter;
55 import android.support.v7.view.menu.MenuBuilder;
56 import android.support.v7.view.menu.MenuPresenter;
57 import android.support.v7.view.menu.MenuView;
343 if (!isDestroyed() && (st == null || st.menu == null)) {
640 void onPanelClosed(final int featureId, Menu menu) {
657 boolean onMenuOpened(final int featureId, Menu menu) {
669 public boolean onMenuItemSelected(MenuBuilder menu, MenuItem item) {
672 final PanelFeatureState panel = findMenuPanel(menu.getRootMenu());
681 public void onMenuModeChange(MenuBuilder menu) {
[all …]
/frameworks/support/v7/appcompat/tests/src/android/support/v7/testutils/
DBaseTestActivity.java82 public boolean onMenuOpened(int featureId, Menu menu) { in onMenuOpened() argument
84 return super.onMenuOpened(featureId, menu); in onMenuOpened()
88 public void onPanelClosed(int featureId, Menu menu) { in onPanelClosed() argument
90 super.onPanelClosed(featureId, menu); in onPanelClosed()
132 public boolean onCreateOptionsMenu(Menu menu) { in onCreateOptionsMenu() argument
133 mMenu = menu; in onCreateOptionsMenu()
135 getMenuInflater().inflate(R.menu.sample_actions, menu); in onCreateOptionsMenu()
138 menu.clear(); in onCreateOptionsMenu()
139 return super.onCreateOptionsMenu(menu); in onCreateOptionsMenu()
/frameworks/support/v7/appcompat/src/android/support/v7/view/
DWindowCallbackWrapper.java92 public boolean onCreatePanelMenu(int featureId, Menu menu) { in onCreatePanelMenu() argument
93 return mWrapped.onCreatePanelMenu(featureId, menu); in onCreatePanelMenu()
97 public boolean onPreparePanel(int featureId, View view, Menu menu) { in onPreparePanel() argument
98 return mWrapped.onPreparePanel(featureId, view, menu); in onPreparePanel()
102 public boolean onMenuOpened(int featureId, Menu menu) { in onMenuOpened() argument
103 return mWrapped.onMenuOpened(featureId, menu); in onMenuOpened()
137 public void onPanelClosed(int featureId, Menu menu) { in onPanelClosed() argument
138 mWrapped.onPanelClosed(featureId, menu); in onPanelClosed()
176 List<KeyboardShortcutGroup> data, Menu menu, int deviceId) { in onProvideKeyboardShortcuts() argument
177 mWrapped.onProvideKeyboardShortcuts(data, menu, deviceId); in onProvideKeyboardShortcuts()
/frameworks/base/core/tests/coretests/src/android/view/menu/
DMenuScenario.java17 package android.view.menu;
59 public boolean onCreateOptionsMenu(Menu menu) { in onCreateOptionsMenu() argument
61 mMenu = menu; in onCreateOptionsMenu()
67 if ((item = onAddMenuItem(menu, i)) == null) { in onCreateOptionsMenu()
71 item = menu.add(0, 0, 0, (givenTitle != null) ? givenTitle : ("Item " + i)); in onCreateOptionsMenu()
88 public boolean onPrepareOptionsMenu(Menu menu) { in onPrepareOptionsMenu() argument
90 mMenu = menu; in onPrepareOptionsMenu()
103 protected MenuItem onAddMenuItem(Menu menu, int itemPosition) { in onAddMenuItem() argument
DMenuLayout.java17 package android.view.menu;
19 import android.view.menu.MenuScenario.Params;
41 public boolean onPrepareOptionsMenu(Menu menu) { in onPrepareOptionsMenu() argument
47 menu.clear(); in onPrepareOptionsMenu()
48 onCreateOptionsMenu(menu); in onPrepareOptionsMenu()
/frameworks/base/core/java/android/widget/
DMenuPopupWindow.java30 import com.android.internal.view.menu.ListMenuItemView;
31 import com.android.internal.view.menu.MenuAdapter;
32 import com.android.internal.view.menu.MenuBuilder;
77 public void onItemHoverEnter(@NonNull MenuBuilder menu, @NonNull MenuItem item) { in onItemHoverEnter() argument
80 mHoverListener.onItemHoverEnter(menu, item); in onItemHoverEnter()
85 public void onItemHoverExit(@NonNull MenuBuilder menu, @NonNull MenuItem item) { in onItemHoverExit() argument
88 mHoverListener.onItemHoverExit(menu, item); in onItemHoverExit()
178 final MenuBuilder menu = menuAdapter.getAdapterMenu(); in onHoverEvent() local
180 mHoverListener.onItemHoverExit(menu, oldMenuItem); in onHoverEvent()
186 mHoverListener.onItemHoverEnter(menu, menuItem); in onHoverEvent()

1234567891011