Home
last modified time | relevance | path

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

1234567

/frameworks/base/core/tests/coretests/src/android/view/
DListContextMenu.java91 public boolean onCreateOptionsMenu(Menu menu) { in onCreateOptionsMenu() argument
92 MenuItem item = menu.add(0, 0, 0, "Really long menu item name"); in onCreateOptionsMenu()
96 …SubMenu sm = menu.addSubMenu(0, 0, 0, "The 2nd item, a sub menu").setIcon(R.drawable.black_square_… in onCreateOptionsMenu()
103 menu.add(0, 0, 0, "Item 3"); in onCreateOptionsMenu()
104 menu.add(0, 0, 0, "Item 4"); in onCreateOptionsMenu()
105 menu.add(0, 0, 0, "Item 5"); in onCreateOptionsMenu()
106 menu.add(0, 0, 0, "Item 6"); in onCreateOptionsMenu()
107 menu.add(0, 0, 0, "Item 7"); in onCreateOptionsMenu()
108 menu.add(0, 0, 0, "Item 8"); in onCreateOptionsMenu()
109 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;
122 public void onItemHoverExit(@NonNull MenuBuilder menu, @NonNull MenuItem item) {
126 mSubMenuHoverHandler.removeCallbacksAndMessages(menu);
131 @NonNull final MenuBuilder menu, @NonNull final MenuItem item) {
138 if (menu == mShowingMenus.get(i).menu) {
165 nextInfo.menu.close(false /* closeAllMenus */);
171 menu.performItemAction(item, 0);
176 mSubMenuHoverHandler.postAtTime(runnable, menu, uptimeMillis);
246 for (MenuBuilder menu : mPendingMenus) { in show()
247 showMenu(menu); in show()
[all …]
DMenuDialogHelper.java17 package com.android.internal.view.menu;
41 public MenuDialogHelper(MenuBuilder menu) { in MenuDialogHelper() argument
42 mMenu = menu; in MenuDialogHelper()
53 final MenuBuilder menu = mMenu; in show() local
56 final AlertDialog.Builder builder = new AlertDialog.Builder(menu.getContext()); in show()
66 final View headerView = menu.getHeaderView(); in show()
72 builder.setIcon(menu.getHeaderIcon()).setTitle(menu.getHeaderTitle()); in show()
152 public void onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing) { in onCloseMenu() argument
153 if (allMenusAreClosing || menu == mMenu) { in onCloseMenu()
157 mPresenterCallback.onCloseMenu(menu, allMenusAreClosing); in onCloseMenu()
DMenuPresenter.java17 package com.android.internal.view.menu;
40 public void onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing); in onCloseMenu() argument
65 public void initForMenu(@NonNull Context context, @Nullable MenuBuilder menu); in initForMenu() argument
111 public void onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing); in onCloseMenu() argument
126 public boolean expandItemActionView(MenuBuilder menu, MenuItemImpl item); in expandItemActionView() argument
135 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
DMenuPopup.java17 package com.android.internal.view.menu;
54 public abstract void addMenu(MenuBuilder menu); in addMenu() argument
97 public void initForMenu(@NonNull Context context, @Nullable MenuBuilder menu) { in initForMenu() argument
107 public boolean expandItemActionView(MenuBuilder menu, MenuItemImpl item) { in expandItemActionView() argument
112 public boolean collapseItemActionView(MenuBuilder menu, MenuItemImpl item) { in collapseItemActionView() argument
198 protected static boolean shouldPreserveIconSpacing(MenuBuilder menu) { in shouldPreserveIconSpacing() argument
200 final int count = menu.size(); in shouldPreserveIconSpacing()
203 MenuItem childItem = menu.getItem(i); in shouldPreserveIconSpacing()
DMenuPopupHelper.java17 package com.android.internal.view.menu;
33 import com.android.internal.view.menu.MenuPresenter.Callback;
60 public MenuPopupHelper(@NonNull Context context, @NonNull MenuBuilder menu) { in MenuPopupHelper() argument
61 this(context, menu, null, false, com.android.internal.R.attr.popupMenuStyle, 0); in MenuPopupHelper()
65 public MenuPopupHelper(@NonNull Context context, @NonNull MenuBuilder menu, in MenuPopupHelper() argument
67 this(context, menu, anchorView, false, com.android.internal.R.attr.popupMenuStyle, 0); in MenuPopupHelper()
70 public MenuPopupHelper(@NonNull Context context, @NonNull MenuBuilder menu, in MenuPopupHelper() argument
73 this(context, menu, anchorView, overflowOnly, popupStyleAttr, 0); in MenuPopupHelper()
76 public MenuPopupHelper(@NonNull Context context, @NonNull MenuBuilder menu, in MenuPopupHelper() argument
80 mMenu = menu; in MenuPopupHelper()
/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/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/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;
39 public boolean onPrepareOptionsMenu(Menu menu) { in onPrepareOptionsMenu() argument
45 menu.clear(); in onPrepareOptionsMenu()
46 onCreateOptionsMenu(menu); in onPrepareOptionsMenu()
DContextMenuActivity.java17 package android.view.menu;
42 public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) { in onCreateContextMenu() argument
43 menu.add(LABEL_ITEM); in onCreateContextMenu()
44 menu.addSubMenu(LABEL_SUBMENU).add(LABEL_SUBITEM); in onCreateContextMenu()
/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()
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/core/lifecycle/
DObservableDialogFragment.java89 public void onCreateOptionsMenu(final Menu menu, final MenuInflater inflater) { in onCreateOptionsMenu() argument
90 mLifecycle.onCreateOptionsMenu(menu, inflater); in onCreateOptionsMenu()
91 super.onCreateOptionsMenu(menu, inflater); in onCreateOptionsMenu()
95 public void onPrepareOptionsMenu(final Menu menu) { in onPrepareOptionsMenu() argument
96 mLifecycle.onPrepareOptionsMenu(menu); in onPrepareOptionsMenu()
97 super.onPrepareOptionsMenu(menu); in onPrepareOptionsMenu()
DObservableActivity.java94 public boolean onCreateOptionsMenu(final Menu menu) { in onCreateOptionsMenu() argument
95 if (super.onCreateOptionsMenu(menu)) { in onCreateOptionsMenu()
96 mLifecycle.onCreateOptionsMenu(menu, null); in onCreateOptionsMenu()
103 public boolean onPrepareOptionsMenu(final Menu menu) { in onPrepareOptionsMenu() argument
104 if (super.onPrepareOptionsMenu(menu)) { in onPrepareOptionsMenu()
105 mLifecycle.onPrepareOptionsMenu(menu); in onPrepareOptionsMenu()
DObservableFragment.java103 public void onCreateOptionsMenu(final Menu menu, final MenuInflater inflater) { in onCreateOptionsMenu() argument
104 mLifecycle.onCreateOptionsMenu(menu, inflater); in onCreateOptionsMenu()
105 super.onCreateOptionsMenu(menu, inflater); in onCreateOptionsMenu()
110 public void onPrepareOptionsMenu(final Menu menu) { in onPrepareOptionsMenu() argument
111 mLifecycle.onPrepareOptionsMenu(menu); in onPrepareOptionsMenu()
112 super.onPrepareOptionsMenu(menu); in onPrepareOptionsMenu()
DObservablePreferenceFragment.java114 public void onCreateOptionsMenu(final Menu menu, final MenuInflater inflater) { in onCreateOptionsMenu() argument
115 mLifecycle.onCreateOptionsMenu(menu, inflater); in onCreateOptionsMenu()
116 super.onCreateOptionsMenu(menu, inflater); in onCreateOptionsMenu()
121 public void onPrepareOptionsMenu(final Menu menu) { in onPrepareOptionsMenu() argument
122 mLifecycle.onPrepareOptionsMenu(menu); in onPrepareOptionsMenu()
123 super.onPrepareOptionsMenu(menu); in onPrepareOptionsMenu()
/frameworks/opt/photoviewer/activity/src/com/android/ex/photo/
DPhotoViewActivity.java97 public boolean onCreateOptionsMenu(Menu menu) { in onCreateOptionsMenu() argument
98 return mController.onCreateOptionsMenu(menu) || super.onCreateOptionsMenu(menu); in onCreateOptionsMenu()
102 public boolean onPrepareOptionsMenu(Menu menu) { in onPrepareOptionsMenu() argument
103 return mController.onPrepareOptionsMenu(menu) || super.onPrepareOptionsMenu(menu); in onPrepareOptionsMenu()
/frameworks/base/tests/HwAccelerationTest/src/com/android/test/hwui/
DListActivity.java98 … public void onCreateContextMenu(ContextMenu menu, View v, ContextMenu.ContextMenuInfo menuInfo) { in onCreateContextMenu() argument
99 super.onCreateContextMenu(menu, v, menuInfo); in onCreateContextMenu()
100 menu.setHeaderTitle("Context menu"); in onCreateContextMenu()
101 menu.add("List item 1"); in onCreateContextMenu()
102 menu.add("List item 2"); in onCreateContextMenu()
103 menu.add("List item 3"); in onCreateContextMenu()
DTransparentListActivity.java96 … public void onCreateContextMenu(ContextMenu menu, View v, ContextMenu.ContextMenuInfo menuInfo) { in onCreateContextMenu() argument
97 super.onCreateContextMenu(menu, v, menuInfo); in onCreateContextMenu()
98 menu.setHeaderTitle("Context menu"); in onCreateContextMenu()
99 menu.add("List item 1"); in onCreateContextMenu()
100 menu.add("List item 2"); in onCreateContextMenu()
101 menu.add("List item 3"); in onCreateContextMenu()
/frameworks/opt/photoviewer/appcompat/src/com/android/ex/photo/
DPhotoViewActivity.java97 public boolean onCreateOptionsMenu(Menu menu) { in onCreateOptionsMenu() argument
98 return mController.onCreateOptionsMenu(menu) || super.onCreateOptionsMenu(menu); in onCreateOptionsMenu()
102 public boolean onPrepareOptionsMenu(Menu menu) { in onPrepareOptionsMenu() argument
103 return mController.onPrepareOptionsMenu(menu) || super.onPrepareOptionsMenu(menu); in onPrepareOptionsMenu()
/frameworks/base/tests/ActivityTests/src/com/google/android/test/activity/
DActivityTestMain.java217 public boolean onCreateOptionsMenu(Menu menu) { in onCreateOptionsMenu() argument
218 menu.add("Animate!").setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { in onCreateOptionsMenu()
228 menu.add("Bind!").setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { in onCreateOptionsMenu()
250 menu.add("Start!").setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { in onCreateOptionsMenu()
257menu.add("Rebind Isolated!").setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { in onCreateOptionsMenu()
285 menu.add("Send!").setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { in onCreateOptionsMenu()
293 menu.add("Call!").setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { in onCreateOptionsMenu()
311menu.add("Send to user 0!").setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { in onCreateOptionsMenu()
320 menu.add("Send to user " + mSecondUser + "!").setOnMenuItemClickListener( in onCreateOptionsMenu()
330menu.add("Bind to user 0!").setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { in onCreateOptionsMenu()
[all …]
/frameworks/base/core/java/com/android/internal/view/
DStandaloneActionMode.java18 import com.android.internal.view.menu.MenuBuilder;
19 import com.android.internal.view.menu.MenuPopupHelper;
20 import com.android.internal.view.menu.SubMenuBuilder;
133 public boolean onMenuItemSelected(MenuBuilder menu, MenuItem item) { in onMenuItemSelected() argument
137 public void onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing) { in onCloseMenu() argument
149 public void onCloseSubMenu(SubMenuBuilder menu) { in onCloseSubMenu() argument
152 public void onMenuModeChange(MenuBuilder menu) { in onMenuModeChange() argument
/frameworks/base/core/java/com/android/internal/policy/
DPhoneWindow.java106 import com.android.internal.view.menu.ContextMenuBuilder;
107 import com.android.internal.view.menu.IconMenuPresenter;
108 import com.android.internal.view.menu.ListMenuPresenter;
109 import com.android.internal.view.menu.MenuBuilder;
110 import com.android.internal.view.menu.MenuDialogHelper;
111 import com.android.internal.view.menu.MenuHelper;
112 import com.android.internal.view.menu.MenuPresenter;
113 import com.android.internal.view.menu.MenuView;
631 if (st.menu == null || st.refreshMenuContent) { in preparePanel()
632 if (st.menu == null) { in preparePanel()
[all …]
/frameworks/layoutlib/bridge/src/com/android/internal/view/menu/
DBridgeMenuItemImpl.java17 package com.android.internal.view.menu;
40 BridgeMenuItemImpl(MenuBuilder menu, int group, int id, int categoryOrder, int ordering, in BridgeMenuItemImpl() argument
42 super(menu, group, id, categoryOrder, ordering, title, showAsAction); in BridgeMenuItemImpl()
43 Context context = menu.getContext(); in BridgeMenuItemImpl()

1234567