Home
last modified time | relevance | path

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

123456789

/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/app/
DActionBarActivityDelegateBase.java26 import android.support.v7.internal.view.menu.ListMenuPresenter;
27 import android.support.v7.internal.view.menu.MenuBuilder;
28 import android.support.v7.internal.view.menu.MenuPresenter;
29 import android.support.v7.internal.view.menu.MenuView;
30 import android.support.v7.internal.view.menu.MenuWrapperFactory;
68 final MenuBuilder menu = createMenu();
69 if (mActivity.superOnCreatePanelMenu(Window.FEATURE_OPTIONS_PANEL, menu) &&
70 mActivity.superOnPreparePanel(Window.FEATURE_OPTIONS_PANEL, null, menu)) {
71 setMenu(menu);
261 MenuBuilder menu = mMenu; in onCreatePanelView() local
[all …]
DActionBarActivityDelegateICS.java26 import android.support.v7.internal.view.menu.MenuWrapperFactory;
136 public boolean onCreatePanelMenu(int featureId, Menu menu) { in onCreatePanelMenu() argument
139 mMenu = MenuWrapperFactory.createMenuWrapper(menu); in onCreatePanelMenu()
143 return mActivity.superOnCreatePanelMenu(featureId, menu); in onCreatePanelMenu()
147 public boolean onPreparePanel(int featureId, View view, Menu menu) { in onPreparePanel() argument
151 return mActivity.superOnPreparePanel(featureId, view, menu); in onPreparePanel()
279 public boolean onCreatePanelMenu(int featureId, Menu menu) { in onCreatePanelMenu() argument
280 return mWrapped.onCreatePanelMenu(featureId, menu); in onCreatePanelMenu()
284 public boolean onPreparePanel(int featureId, View view, Menu menu) { in onPreparePanel() argument
285 return mWrapped.onPreparePanel(featureId, view, menu); in onPreparePanel()
[all …]
/frameworks/opt/mailcommon/java/com/android/mailcommon/
DWebViewContextMenu.java143 public void onCreateContextMenu(ContextMenu menu, View v, in onCreateContextMenu() argument
169 inflater.inflate(getMenuResourceId(), menu); in onCreateContextMenu() local
173 for (int i = 0; i < menu.size(); i++) { in onCreateContextMenu()
174 final MenuItem menuItem = menu.getItem(i); in onCreateContextMenu()
181 menu.setGroupVisible(getMenuGroupResId(MenuGroupType.PHONE_GROUP), in onCreateContextMenu()
183 menu.setGroupVisible(getMenuGroupResId(MenuGroupType.EMAIL_GROUP), in onCreateContextMenu()
185 menu.setGroupVisible(getMenuGroupResId(MenuGroupType.GEO_GROUP), in onCreateContextMenu()
187 menu.setGroupVisible(getMenuGroupResId(MenuGroupType.ANCHOR_GROUP), in onCreateContextMenu()
203 menu.setHeaderTitle(decodedPhoneExtra); in onCreateContextMenu()
206 menu.findItem(getMenuResIdForMenuType(MenuType.DIAL_MENU)); in onCreateContextMenu()
[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/
DPopupMenu.java21 import android.support.v7.internal.view.menu.MenuBuilder;
22 import android.support.v7.internal.view.menu.MenuPopupHelper;
23 import android.support.v7.internal.view.menu.MenuPresenter;
24 import android.support.v7.internal.view.menu.SubMenuBuilder;
54 public void onDismiss(PopupMenu menu); in onDismiss() argument
140 public boolean onMenuItemSelected(MenuBuilder menu, MenuItem item) { in onMenuItemSelected() argument
150 public void onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing) { in onCloseMenu() argument
174 public void onCloseSubMenu(SubMenuBuilder menu) { in onCloseSubMenu() argument
180 public void onMenuModeChange(MenuBuilder menu) { in onMenuModeChange() argument
/frameworks/base/core/java/android/widget/
DPopupMenu.java19 import com.android.internal.view.menu.MenuBuilder;
20 import com.android.internal.view.menu.MenuPopupHelper;
21 import com.android.internal.view.menu.MenuPresenter;
22 import com.android.internal.view.menu.SubMenuBuilder;
53 public void onDismiss(PopupMenu menu); in onDismiss() argument
140 public boolean onMenuItemSelected(MenuBuilder menu, MenuItem item) { in onMenuItemSelected() argument
150 public void onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing) { in onCloseMenu() argument
174 public void onCloseSubMenu(SubMenuBuilder menu) { in onCloseSubMenu() argument
180 public void onMenuModeChange(MenuBuilder menu) { in onMenuModeChange() argument
/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;
41 public void onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing); in onCloseMenu() argument
62 public void initForMenu(Context context, MenuBuilder menu); in initForMenu() argument
106 public void onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing); in onCloseMenu() argument
122 public boolean expandItemActionView(MenuBuilder menu, MenuItemImpl item); in expandItemActionView() argument
131 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;
48 public void initialize(MenuBuilder menu) { in initialize() argument
49 mMenu = menu; in initialize()
DMenuPopupHelper.java17 package android.support.v7.internal.view.menu;
69 public MenuPopupHelper(Context context, MenuBuilder menu) { in MenuPopupHelper() argument
70 this(context, menu, null, false); in MenuPopupHelper()
73 public MenuPopupHelper(Context context, MenuBuilder menu, View anchorView) { in MenuPopupHelper() argument
74 this(context, menu, anchorView, false); in MenuPopupHelper()
77 public MenuPopupHelper(Context context, MenuBuilder menu, in MenuPopupHelper() argument
81 mMenu = menu; in MenuPopupHelper()
90 menu.addMenuPresenter(this); in MenuPopupHelper()
211 public void initForMenu(Context context, MenuBuilder menu) { in initForMenu() argument
260 public void onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing) { in onCloseMenu() argument
[all …]
DBaseMenuPresenter.java17 package android.support.v7.internal.view.menu;
64 public void initForMenu(Context context, MenuBuilder menu) { in initForMenu() argument
67 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/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;
38 public void onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing); in onCloseMenu() argument
60 public void initForMenu(Context context, MenuBuilder menu); in initForMenu() argument
104 public void onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing); in onCloseMenu() argument
119 public boolean expandItemActionView(MenuBuilder menu, MenuItemImpl item); in expandItemActionView() argument
128 public boolean collapseItemActionView(MenuBuilder menu, MenuItemImpl item); in collapseItemActionView() argument
DMenuPopupHelper.java17 package com.android.internal.view.menu;
67 public MenuPopupHelper(Context context, MenuBuilder menu) { in MenuPopupHelper() argument
68 this(context, menu, null, false); in MenuPopupHelper()
71 public MenuPopupHelper(Context context, MenuBuilder menu, View anchorView) { in MenuPopupHelper() argument
72 this(context, menu, anchorView, false); in MenuPopupHelper()
75 public MenuPopupHelper(Context context, MenuBuilder menu, in MenuPopupHelper() argument
79 mMenu = menu; in MenuPopupHelper()
88 menu.addMenuPresenter(this); in MenuPopupHelper()
220 public void initForMenu(Context context, MenuBuilder menu) { in initForMenu() argument
267 public void onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing) { in onCloseMenu() argument
[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()
197 public void onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing) { in onCloseMenu() argument
199 mCallback.onCloseMenu(menu, allMenusAreClosing); in onCloseMenu()
203 public boolean onSubMenuSelected(SubMenuBuilder menu) { in onSubMenuSelected() argument
205 return mCallback.onOpenSubMenu(menu); in onSubMenuSelected()
214 public boolean expandItemActionView(MenuBuilder menu, MenuItemImpl item) { in expandItemActionView() argument
218 public boolean collapseItemActionView(MenuBuilder menu, MenuItemImpl item) { in collapseItemActionView() argument
DMenuView.java17 package com.android.internal.view.menu;
19 import com.android.internal.view.menu.MenuBuilder;
20 import com.android.internal.view.menu.MenuItemImpl;
37 public void initialize(MenuBuilder menu); in initialize() argument
/frameworks/base/core/java/android/webkit/
DSelectActionModeCallback.java53 public boolean onCreateActionMode(ActionMode mode, Menu menu) { in onCreateActionMode() argument
54 mode.getMenuInflater().inflate(com.android.internal.R.menu.webview_copy, menu); in onCreateActionMode()
74 setMenuVisibility(menu, canFind, com.android.internal.R.id.find); in onCreateActionMode()
75 setMenuVisibility(menu, canPaste, com.android.internal.R.id.paste); in onCreateActionMode()
76 setMenuVisibility(menu, canCut, com.android.internal.R.id.cut); in onCreateActionMode()
77 setMenuVisibility(menu, canCopy, com.android.internal.R.id.copy); in onCreateActionMode()
78 setMenuVisibility(menu, canWebSearch, com.android.internal.R.id.websearch); in onCreateActionMode()
84 public boolean onPrepareActionMode(ActionMode mode, Menu menu) { in onPrepareActionMode() argument
143 private void setMenuVisibility(Menu menu, boolean visible, int resourceId) { in setMenuVisibility() argument
144 final MenuItem item = menu.findItem(resourceId); in setMenuVisibility()
/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/tests/HwAccelerationTest/src/com/android/test/hwui/
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()
DListActivity.java102 … public void onCreateContextMenu(ContextMenu menu, View v, ContextMenu.ContextMenuInfo menuInfo) { in onCreateContextMenu() argument
103 super.onCreateContextMenu(menu, v, menuInfo); in onCreateContextMenu()
104 menu.setHeaderTitle("Context menu"); in onCreateContextMenu()
105 menu.add("List item 1"); in onCreateContextMenu()
106 menu.add("List item 2"); in onCreateContextMenu()
107 menu.add("List item 3"); in onCreateContextMenu()
/frameworks/base/policy/src/com/android/internal/policy/impl/
DPhoneWindow.java27 import com.android.internal.view.menu.ContextMenuBuilder;
28 import com.android.internal.view.menu.IconMenuPresenter;
29 import com.android.internal.view.menu.ListMenuPresenter;
30 import com.android.internal.view.menu.MenuBuilder;
31 import com.android.internal.view.menu.MenuDialogHelper;
32 import com.android.internal.view.menu.MenuPresenter;
33 import com.android.internal.view.menu.MenuView;
394 if (st.menu == null || st.refreshMenuContent) { in preparePanel()
395 if (st.menu == null) { in preparePanel()
396 if (!initializePanelMenu(st) || (st.menu == null)) { in preparePanel()
[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;
132 public boolean onMenuItemSelected(MenuBuilder menu, MenuItem item) { in onMenuItemSelected() argument
136 public void onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing) { in onCloseMenu() argument
148 public void onCloseSubMenu(SubMenuBuilder menu) { in onCloseSubMenu() argument
151 public void onMenuModeChange(MenuBuilder menu) { in onMenuModeChange() argument

123456789