Home
last modified time | relevance | path

Searched refs:menu (Results 1 – 25 of 271) 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/support/v7/appcompat/src/android/support/v7/internal/app/
DToolbarActionBar.java29 import android.support.v7.internal.view.menu.ListMenuPresenter;
30 import android.support.v7.internal.view.menu.MenuBuilder;
31 import android.support.v7.internal.view.menu.MenuPresenter;
450 final Menu menu = getMenu(); in populateOptionsMenu() local
451 final MenuBuilder mb = menu instanceof MenuBuilder ? (MenuBuilder) menu : null; in populateOptionsMenu()
456 menu.clear(); in populateOptionsMenu()
457 if (!mWindowCallback.onCreatePanelMenu(Window.FEATURE_OPTIONS_PANEL, menu) || in populateOptionsMenu()
458 !mWindowCallback.onPreparePanel(Window.FEATURE_OPTIONS_PANEL, null, menu)) { in populateOptionsMenu()
459 menu.clear(); in populateOptionsMenu()
478 Menu menu = getMenu(); in onKeyShortcut() local
[all …]
/frameworks/base/docs/html/guide/practices/ui_guidelines/
Dmenu_design.jd44 <li>An Options menu is for any commands that are global to the current activity. </li>
45 <li>A Context menu is for any commands that apply to the current selection. </li>
48 …<li>The commands on the Context menu that appears when you touch &amp; hold on an item should be d…
67 …dding-top: 4px;"><a href=#dont_put_commands>Don't put commands <em>only</em> in a Context menu</li>
68 …<li style="padding-top: 4px;"><a href=#first_in_context_menu>First command in Context menu should …
70 …<li style="padding-top: 4px;"><a href=#context_menu_should_identify>A Context menu should identify…
72 … <li style="padding-top: 4px;"><a href=#short_names>Use short names in Options icon menu</a></li>
73 …;"><a href=#a_dialog_should_not_have_an_options_menu>A dialog should not have Options menu</a></li>
74 …<li style="padding-top: 4px;"><a href=#do_not_substitute_message>If no Options menu, don't display…
75 …<li style="padding-top: 4px;"><a href=#dim_hide_menu_items>Dim or hide menu items not available</a…
[all …]
/frameworks/base/docs/html/guide/topics/ui/
Dmenus.jd11 <li><a href="#options-menu">Creating an Options Menu</a>
14 <li><a href="#ChangingTheMenu">Changing menu items at runtime</a></li>
17 <li><a href="#context-menu">Creating Contextual Menus</a>
19 <li><a href="#FloatingContextMenu">Creating a floating context menu</a></li>
30 <li><a href="#checkable">Using checkable menu items</a></li>
51 <li><a href="{@docRoot}guide/topics/resources/menu-resource.html">Menu Resource</a></li>
53 href="http://android-developers.blogspot.com/2012/01/say-goodbye-to-menu-button.html">Say
65 dependence on the traditional 6-item menu panel and instead provide an action bar to present common
68 <p>Although the design and user experience for some menu items have changed, the semantics to define
74 <dt><strong>Options menu and action bar</strong></dt>
[all …]
/frameworks/support/v7/appcompat/src/android/support/v7/widget/
DWindowCallbackWrapper.java48 public boolean onCreatePanelMenu(int featureId, Menu menu) { in onCreatePanelMenu() argument
49 return mWrapped.onCreatePanelMenu(featureId, menu); in onCreatePanelMenu()
53 public boolean onPreparePanel(int featureId, View menuView, Menu menu) { in onPreparePanel() argument
54 return mWrapped.onPreparePanel(featureId, menuView, menu); in onPreparePanel()
58 public void onPanelClosed(int featureId, Menu menu) { in onPanelClosed() argument
59 mWrapped.onPanelClosed(featureId, menu); in onPanelClosed()
63 public boolean onMenuOpened(int featureId, Menu menu) { in onMenuOpened() argument
64 return mWrapped.onMenuOpened(featureId, menu); in onMenuOpened()
DPopupMenu.java24 import android.support.v7.internal.view.menu.MenuBuilder;
25 import android.support.v7.internal.view.menu.MenuPopupHelper;
26 import android.support.v7.internal.view.menu.MenuPresenter;
27 import android.support.v7.internal.view.menu.SubMenuBuilder;
59 public void onDismiss(PopupMenu menu); in onDismiss() argument
225 public boolean onMenuItemSelected(MenuBuilder menu, MenuItem item) { in onMenuItemSelected() argument
235 public void onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing) { in onCloseMenu() argument
259 public void onCloseSubMenu(SubMenuBuilder menu) { in onCloseSubMenu() argument
265 public void onMenuModeChange(MenuBuilder menu) { in onMenuModeChange() argument
/frameworks/support/v7/appcompat/src/android/support/v7/app/
DActionBarActivityDelegateBase.java41 import android.support.v7.internal.view.menu.ListMenuPresenter;
42 import android.support.v7.internal.view.menu.MenuBuilder;
43 import android.support.v7.internal.view.menu.MenuPresenter;
44 import android.support.v7.internal.view.menu.MenuView;
394 if (!isDestroyed() && (st == null || st.menu == null)) { in ensureSubDecor()
497 public boolean onCreatePanelMenu(int featureId, Menu menu) {
499 return getWindowCallback().onCreatePanelMenu(featureId, menu);
505 public boolean onPreparePanel(int featureId, View view, Menu menu) {
507 return getWindowCallback().onPreparePanel(featureId, view, menu);
513 public void onPanelClosed(final int featureId, Menu menu) {
[all …]
DActionBarActivity.java229 public boolean onCreatePanelMenu(int featureId, Menu menu) { in onCreatePanelMenu() argument
230 return getDelegate().onCreatePanelMenu(featureId, menu); in onCreatePanelMenu()
234 public boolean onPreparePanel(int featureId, View view, Menu menu) { in onPreparePanel() argument
235 return getDelegate().onPreparePanel(featureId, view, menu); in onPreparePanel()
239 public void onPanelClosed(int featureId, Menu menu) { in onPanelClosed() argument
240 getDelegate().onPanelClosed(featureId, menu); in onPanelClosed()
244 public boolean onMenuOpened(int featureId, Menu menu) { in onMenuOpened() argument
245 return getDelegate().onMenuOpened(featureId, menu); in onMenuOpened()
252 protected boolean onPrepareOptionsPanel(View view, Menu menu) { in onPrepareOptionsPanel() argument
253 return getDelegate().onPrepareOptionsPanel(view, menu); in onPrepareOptionsPanel()
[all …]
DActionBarActivityDelegate.java79 public boolean onCreatePanelMenu(int featureId, Menu menu) {
80 return mActivity.superOnCreatePanelMenu(featureId, menu);
84 public boolean onPreparePanel(int featureId, View menuView, Menu menu) {
85 return mActivity.superOnPreparePanel(featureId, menuView, menu);
89 public void onPanelClosed(int featureId, Menu menu) {
90 mActivity.onPanelClosed(featureId, menu);
94 public boolean onMenuOpened(int featureId, Menu menu) {
95 return mActivity.onMenuOpened(featureId, menu);
192 abstract boolean onPreparePanel(int featureId, View view, Menu menu); in onPreparePanel() argument
194 abstract void onPanelClosed(int featureId, Menu menu); in onPanelClosed() argument
[all …]
/frameworks/support/v7/appcompat/src/android/support/v7/internal/view/menu/
DMenuDialogHelper.java17 package android.support.v7.internal.view.menu;
43 public MenuDialogHelper(MenuBuilder menu) { in MenuDialogHelper() argument
44 mMenu = menu; in MenuDialogHelper()
54 final MenuBuilder menu = mMenu; in show() local
57 final AlertDialog.Builder builder = new AlertDialog.Builder(menu.getContext()); in show()
69 final View headerView = menu.getHeaderView(); in show()
75 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 android.support.v7.internal.view.menu;
42 public void onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing); in onCloseMenu() argument
64 public void initForMenu(Context context, MenuBuilder menu); in initForMenu() argument
108 public void onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing); in onCloseMenu() argument
123 public boolean expandItemActionView(MenuBuilder menu, MenuItemImpl item); in expandItemActionView() argument
132 public boolean collapseItemActionView(MenuBuilder menu, MenuItemImpl item); in collapseItemActionView() argument
DMenuPopupHelper.java17 package android.support.v7.internal.view.menu;
79 public MenuPopupHelper(Context context, MenuBuilder menu) { in MenuPopupHelper() argument
80 this(context, menu, null, false, R.attr.popupMenuStyle); in MenuPopupHelper()
83 public MenuPopupHelper(Context context, MenuBuilder menu, View anchorView) { in MenuPopupHelper() argument
84 this(context, menu, anchorView, false, R.attr.popupMenuStyle); in MenuPopupHelper()
87 public MenuPopupHelper(Context context, MenuBuilder menu, View anchorView, in MenuPopupHelper() argument
89 this(context, menu, anchorView, overflowOnly, popupStyleAttr, 0); in MenuPopupHelper()
92 public MenuPopupHelper(Context context, MenuBuilder menu, View anchorView, in MenuPopupHelper() argument
96 mMenu = menu; in MenuPopupHelper()
109 menu.addMenuPresenter(this, context); in MenuPopupHelper()
[all …]
DBaseMenuPresenter.java17 package android.support.v7.internal.view.menu;
65 public void initForMenu(Context context, MenuBuilder menu) { in initForMenu() argument
68 mMenu = menu; in initForMenu()
205 public void onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing) { in onCloseMenu() argument
207 mCallback.onCloseMenu(menu, allMenusAreClosing); in onCloseMenu()
211 public boolean onSubMenuSelected(SubMenuBuilder menu) { in onSubMenuSelected() argument
213 return mCallback.onOpenSubMenu(menu); in onSubMenuSelected()
222 public boolean expandItemActionView(MenuBuilder menu, MenuItemImpl item) { in expandItemActionView() argument
226 public boolean collapseItemActionView(MenuBuilder menu, MenuItemImpl item) { in collapseItemActionView() argument
DExpandedMenuView.java17 package android.support.v7.internal.view.menu;
20 import android.support.v7.internal.view.menu.MenuBuilder;
21 import android.support.v7.internal.view.menu.MenuBuilder.ItemInvoker;
22 import android.support.v7.internal.view.menu.MenuView;
69 public void initialize(MenuBuilder menu) { in initialize() argument
70 mMenu = menu; in initialize()
/frameworks/base/core/java/com/android/internal/view/menu/
DMenuDialogHelper.java17 package com.android.internal.view.menu;
42 public MenuDialogHelper(MenuBuilder menu) { in MenuDialogHelper() argument
43 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()
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 com.android.internal.view.menu;
37 public void onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing); in onCloseMenu() argument
59 public void initForMenu(Context context, MenuBuilder menu); in initForMenu() argument
103 public void onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing); in onCloseMenu() argument
118 public boolean expandItemActionView(MenuBuilder menu, MenuItemImpl item); in expandItemActionView() argument
127 public boolean collapseItemActionView(MenuBuilder menu, MenuItemImpl item); in collapseItemActionView() argument
DMenuPopupHelper.java17 package com.android.internal.view.menu;
76 public MenuPopupHelper(Context context, MenuBuilder menu) { in MenuPopupHelper() argument
77 this(context, menu, null, false, com.android.internal.R.attr.popupMenuStyle, 0); in MenuPopupHelper()
80 public MenuPopupHelper(Context context, MenuBuilder menu, View anchorView) { in MenuPopupHelper() argument
81 this(context, menu, anchorView, false, com.android.internal.R.attr.popupMenuStyle, 0); in MenuPopupHelper()
84 public MenuPopupHelper(Context context, MenuBuilder menu, View anchorView, in MenuPopupHelper() argument
86 this(context, menu, anchorView, overflowOnly, popupStyleAttr, 0); in MenuPopupHelper()
89 public MenuPopupHelper(Context context, MenuBuilder menu, View anchorView, in MenuPopupHelper() argument
93 mMenu = menu; in MenuPopupHelper()
106 menu.addMenuPresenter(this, context); in MenuPopupHelper()
[all …]
DBaseMenuPresenter.java17 package com.android.internal.view.menu;
61 public void initForMenu(Context context, MenuBuilder menu) { in initForMenu() argument
64 mMenu = menu; in initForMenu()
201 public void onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing) { in onCloseMenu() argument
203 mCallback.onCloseMenu(menu, allMenusAreClosing); in onCloseMenu()
207 public boolean onSubMenuSelected(SubMenuBuilder menu) { in onSubMenuSelected() argument
209 return mCallback.onOpenSubMenu(menu); in onSubMenuSelected()
218 public boolean expandItemActionView(MenuBuilder menu, MenuItemImpl item) { in expandItemActionView() argument
222 public boolean collapseItemActionView(MenuBuilder menu, MenuItemImpl item) { in collapseItemActionView() argument
/frameworks/base/core/java/android/view/
DWindowCallbackWrapper.java75 public boolean onCreatePanelMenu(int featureId, Menu menu) { in onCreatePanelMenu() argument
76 return mWrapped.onCreatePanelMenu(featureId, menu); in onCreatePanelMenu()
80 public boolean onPreparePanel(int featureId, View view, Menu menu) { in onPreparePanel() argument
81 return mWrapped.onPreparePanel(featureId, view, menu); in onPreparePanel()
85 public boolean onMenuOpened(int featureId, Menu menu) { in onMenuOpened() argument
86 return mWrapped.onMenuOpened(featureId, menu); in onMenuOpened()
120 public void onPanelClosed(int featureId, Menu menu) { in onPanelClosed() argument
121 mWrapped.onPanelClosed(featureId, menu); in onPanelClosed()
/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/
DPopupMenu.java20 import com.android.internal.view.menu.MenuBuilder;
21 import com.android.internal.view.menu.MenuPopupHelper;
22 import com.android.internal.view.menu.MenuPresenter;
23 import com.android.internal.view.menu.SubMenuBuilder;
59 public void onDismiss(PopupMenu menu); in onDismiss() argument
226 public boolean onMenuItemSelected(MenuBuilder menu, MenuItem item) { in onMenuItemSelected() argument
236 public void onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing) { in onCloseMenu() argument
260 public void onCloseSubMenu(SubMenuBuilder menu) { in onCloseSubMenu() argument
266 public void onMenuModeChange(MenuBuilder menu) { in onMenuModeChange() argument
/frameworks/base/core/java/com/android/internal/app/
DToolbarActionBar.java35 import com.android.internal.view.menu.MenuBuilder;
36 import com.android.internal.view.menu.MenuPresenter;
438 final Menu menu = mDecorToolbar.getMenu(); in populateOptionsMenu() local
439 final MenuBuilder mb = menu instanceof MenuBuilder ? (MenuBuilder) menu : null; in populateOptionsMenu()
444 menu.clear(); in populateOptionsMenu()
445 if (!mWindowCallback.onCreatePanelMenu(Window.FEATURE_OPTIONS_PANEL, menu) || in populateOptionsMenu()
446 !mWindowCallback.onPreparePanel(Window.FEATURE_OPTIONS_PANEL, null, menu)) { in populateOptionsMenu()
447 menu.clear(); in populateOptionsMenu()
490 public boolean onPreparePanel(int featureId, View view, Menu menu) { in onPreparePanel() argument
491 final boolean result = super.onPreparePanel(featureId, view, menu); in onPreparePanel()
[all …]
/frameworks/opt/photoviewer/activity/src/com/android/ex/photo/
DPhotoViewActivity.java96 public boolean onCreateOptionsMenu(Menu menu) { in onCreateOptionsMenu() argument
97 return mController.onCreateOptionsMenu(menu) || super.onCreateOptionsMenu(menu); in onCreateOptionsMenu()
101 public boolean onPrepareOptionsMenu(Menu menu) { in onPrepareOptionsMenu() argument
102 return mController.onPrepareOptionsMenu(menu) || super.onPrepareOptionsMenu(menu); in onPrepareOptionsMenu()
/frameworks/opt/photoviewer/appcompat/src/com/android/ex/photo/
DPhotoViewActivity.java96 public boolean onCreateOptionsMenu(Menu menu) { in onCreateOptionsMenu() argument
97 return mController.onCreateOptionsMenu(menu) || super.onCreateOptionsMenu(menu); in onCreateOptionsMenu()
101 public boolean onPrepareOptionsMenu(Menu menu) { in onPrepareOptionsMenu() argument
102 return mController.onPrepareOptionsMenu(menu) || super.onPrepareOptionsMenu(menu); in onPrepareOptionsMenu()

1234567891011