Home
last modified time | relevance | path

Searched refs:MenuItem (Results 1 – 25 of 117) sorted by relevance

12345

/frameworks/base/core/java/android/view/
DMenuItem.java47 public interface MenuItem { interface
94 public boolean onMenuItemClick(MenuItem item); in onMenuItemClick()
113 public boolean onMenuItemActionExpand(MenuItem item); in onMenuItemActionExpand()
121 public boolean onMenuItemActionCollapse(MenuItem item); in onMenuItemActionCollapse()
162 public MenuItem setTitle(CharSequence title); in setTitle()
176 public MenuItem setTitle(@StringRes int title); in setTitle()
193 public MenuItem setTitleCondensed(CharSequence title); in setTitleCondensed()
212 public MenuItem setIcon(Drawable icon); in setIcon()
225 public MenuItem setIcon(@DrawableRes int iconRes); in setIcon()
253 public default MenuItem setIconTintList(@Nullable ColorStateList tint) { return this; } in setIconTintList()
[all …]
DMenu.java150 public MenuItem add(CharSequence title); in add()
159 public MenuItem add(@StringRes int titleRes); in add()
176 public MenuItem add(int groupId, int itemId, int order, CharSequence title); in add()
193 public MenuItem add(int groupId, int itemId, int order, @StringRes int titleRes); in add()
305 Intent intent, int flags, MenuItem[] outSpecificItems); in addIntentOptions()
385 public MenuItem findItem(int id); in findItem()
403 public MenuItem getItem(int index); in getItem()
DMenuInflater.java214 private void registerMenu(@SuppressWarnings("unused") MenuItem item, in registerMenu()
233 implements MenuItem.OnMenuItemClickListener {
234 private static final Class<?>[] PARAM_TYPES = new Class[] { MenuItem.class };
253 public boolean onMenuItemClick(MenuItem item) { in onMenuItemClick()
393 com.android.internal.R.styleable.MenuItem); in readItem()
476 private void setItem(MenuItem item) { in setItem()
538 public MenuItem addItem() { in addItem()
540 MenuItem item = menu.add(groupId, itemId, itemCategoryOrder, itemTitle); in addItem()
/frameworks/base/core/java/com/android/internal/view/menu/
DActionMenuItem.java29 import android.view.MenuItem;
36 public class ActionMenuItem implements MenuItem {
59 private MenuItem.OnMenuItemClickListener mClickListener;
156 public MenuItem setAlphabeticShortcut(char alphaChar) { in setAlphabeticShortcut()
161 public MenuItem setAlphabeticShortcut(char alphachar, int alphaModifiers) { in setAlphabeticShortcut()
167 public MenuItem setCheckable(boolean checkable) { in setCheckable()
177 public MenuItem setChecked(boolean checked) { in setChecked()
182 public MenuItem setEnabled(boolean enabled) { in setEnabled()
187 public MenuItem setIcon(Drawable icon) { in setIcon()
195 public MenuItem setIcon(int iconRes) { in setIcon()
[all …]
DMenuItemImpl.java35 import android.view.MenuItem;
45 public final class MenuItemImpl implements MenuItem {
86 private MenuItem.OnMenuItemClickListener mClickListener;
180 public MenuItem setEnabled(boolean enabled) { in setEnabled()
213 public MenuItem setIntent(Intent intent) { in setIntent()
222 public MenuItem setCallback(Runnable callback) { in setCallback()
238 public MenuItem setAlphabeticShortcut(char alphaChar) { in setAlphabeticShortcut()
249 public MenuItem setAlphabeticShortcut(char alphaChar, int alphaModifiers){ in setAlphabeticShortcut()
274 public MenuItem setNumericShortcut(char numericChar) { in setNumericShortcut()
285 public MenuItem setNumericShortcut(char numericChar, int numericModifiers){ in setNumericShortcut()
[all …]
DActionMenu.java30 import android.view.MenuItem;
53 public MenuItem add(CharSequence title) { in add()
57 public MenuItem add(int titleRes) { in add()
61 public MenuItem add(int groupId, int itemId, int order, int titleRes) { in add()
65 public MenuItem add(int groupId, int itemId, int order, CharSequence title) { in add()
74 MenuItem[] outSpecificItems) { in addIntentOptions()
91 final MenuItem item = add(groupId, itemId, order, ri.loadLabel(pm)) in addIntentOptions()
142 public MenuItem findItem(int id) { in findItem()
146 public MenuItem getItem(int index) { in getItem()
DMenuBuilder.java38 import android.view.MenuItem;
120 private int mDefaultShowAsAction = MenuItem.SHOW_AS_ACTION_NEVER;
179 public boolean onMenuItemSelected(MenuBuilder menu, MenuItem item); in onMenuItemSelected()
357 final MenuItem item = getItem(i); in saveActionViewStates()
389 final MenuItem item = getItem(i); in restoreActionViewStates()
402 MenuItem itemToExpand = findItem(expandedId); in restoreActionViewStates()
421 private MenuItem addInternal(int group, int id, int categoryOrder, CharSequence title) { in addInternal()
445 public MenuItem add(CharSequence title) { in add()
449 public MenuItem add(int titleRes) { in add()
453 public MenuItem add(int group, int id, int categoryOrder, CharSequence title) { in add()
[all …]
DSubMenuBuilder.java23 import android.view.MenuItem;
66 public MenuItem getItem() { in getItem()
83 boolean dispatchMenuItemSelected(MenuBuilder menu, MenuItem item) { in dispatchMenuItemSelected()
DMenuPopup.java23 import android.view.MenuItem;
128 wrappedAdapter.mAdapterMenu.performItemAction((MenuItem) outerAdapter.getItem(position), 0); in onItemClick()
203 MenuItem childItem = menu.getItem(i); in shouldPreserveIconSpacing()
/frameworks/base/tests/ActivityTests/src/com/google/android/test/activity/
DActivityTestMain.java48 import android.view.MenuItem;
218 menu.add("Animate!").setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { in onCreateOptionsMenu()
220 public boolean onMenuItemClick(MenuItem item) { in onCreateOptionsMenu()
228 menu.add("Bind!").setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { in onCreateOptionsMenu()
229 @Override public boolean onMenuItemClick(MenuItem item) { in onCreateOptionsMenu()
250 menu.add("Start!").setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { in onCreateOptionsMenu()
251 @Override public boolean onMenuItemClick(MenuItem item) { in onCreateOptionsMenu()
257 … menu.add("Rebind Isolated!").setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { in onCreateOptionsMenu()
258 @Override public boolean onMenuItemClick(MenuItem item) { in onCreateOptionsMenu()
285 menu.add("Send!").setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { in onCreateOptionsMenu()
[all …]
/frameworks/base/packages/SystemUI/plugin/src/com/android/systemui/plugins/statusbar/
DNotificationMenuRowPlugin.java28 import com.android.systemui.plugins.statusbar.NotificationMenuRowPlugin.MenuItem;
37 @DependsOn(target = MenuItem.class)
49 public void onMenuClicked(View row, int x, int y, MenuItem menu); in onMenuClicked()
56 @ProvidesInterface(version = MenuItem.VERSION)
57 public interface MenuItem { interface
70 public ArrayList<MenuItem> getMenuItems(Context context); in getMenuItems()
75 public MenuItem getLongpressMenuItem(Context context); in getLongpressMenuItem()
80 public MenuItem getAppOpsMenuItem(Context context); in getAppOpsMenuItem()
85 public MenuItem getSnoozeMenuItem(Context context); in getSnoozeMenuItem()
87 public void setMenuItems(ArrayList<MenuItem> items); in setMenuItems()
[all …]
/frameworks/base/core/tests/coretests/src/android/view/
DMenuTest.java40 final MenuItem item = mMenu.add(0, id, 0, "test"); in testItemId()
54 final MenuItem item = mMenu.add(groupId, 0, item1Index, "test"); in testGroupId()
56 final MenuItem item2 = mMenu.add(groupId, 0, item2Index, "test2"); in testGroupId()
101 final MenuItem stringItem = mMenu.add(title); in testTitle()
102 final MenuItem resItem = mMenu.add(R.string.menu_test); in testTitle()
112 final MenuItem item1 = mMenu.add(groupId, 1, 0, "item1"); in testCheckable()
113 final MenuItem item2 = mMenu.add(groupId, 2, 0, "item2"); in testCheckable()
139 final MenuItem item1 = mMenu.add(0, 1, 0, "item1"); in testVisibility()
140 final MenuItem item2 = mMenu.add(0, 2, 0, "item2"); in testVisibility()
156 final MenuItem subMenuItem = subMenu.getItem(); in testSubMenu()
[all …]
/frameworks/base/core/tests/coretests/src/android/view/menu/
DMenuScenario.java24 import android.view.MenuItem;
30 public class MenuScenario extends Activity implements MenuItem.OnMenuItemClickListener {
33 private MenuItem[] mItems;
54 mItems = new MenuItem[mParams.numItems]; in onParamsChanged()
65 MenuItem item; in onCreateOptionsMenu()
103 protected MenuItem onAddMenuItem(Menu menu, int itemPosition) { in onAddMenuItem()
119 public boolean onMenuItemClick(MenuItem item) { in onMenuItemClick()
138 public int findItemPosition(MenuItem item) { in findItemPosition()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/
DNotificationMenuRow.java77 private MenuItem mAppOpsItem;
78 private MenuItem mSnoozeItem;
79 private ArrayList<MenuItem> mLeftMenuItems;
80 private ArrayList<MenuItem> mRightMenuItems;
81 private final Map<View, MenuItem> mMenuItemsByView = new ArrayMap<>();
134 public ArrayList<MenuItem> getMenuItems(Context context) { in getMenuItems()
139 public MenuItem getLongpressMenuItem(Context context) { in getLongpressMenuItem()
144 public MenuItem getAppOpsMenuItem(Context context) { in getAppOpsMenuItem()
149 public MenuItem getSnoozeMenuItem(Context context) { in getSnoozeMenuItem()
285 ArrayList<MenuItem> menuItems = mDismissRtl ? mLeftMenuItems : mRightMenuItems; in createMenuViews()
[all …]
/frameworks/base/core/java/android/widget/
DMenuItemHoverListener.java4 import android.view.MenuItem;
24 void onItemHoverExit(@NonNull MenuBuilder menu, @NonNull MenuItem item); in onItemHoverExit()
32 void onItemHoverEnter(@NonNull MenuBuilder menu, @NonNull MenuItem item); in onItemHoverEnter()
DMenuPopupWindow.java26 import android.view.MenuItem;
77 public void onItemHoverEnter(@NonNull MenuBuilder menu, @NonNull MenuItem item) { in onItemHoverEnter()
85 public void onItemHoverExit(@NonNull MenuBuilder menu, @NonNull MenuItem item) { in onItemHoverExit()
100 private MenuItem mHoveredMenuItem;
165 MenuItem menuItem = null; in onHoverEvent()
176 final MenuItem oldMenuItem = mHoveredMenuItem; in onHoverEvent()
DPopupMenu.java26 import android.view.MenuItem;
106 public boolean onMenuItemSelected(MenuBuilder menu, MenuItem item) { in PopupMenu()
287 boolean onMenuItemClick(MenuItem item); in onMenuItemClick()
/frameworks/base/core/java/com/android/internal/widget/
DFloatingToolbar.java40 import android.view.MenuItem;
85 private static final MenuItem.OnMenuItemClickListener NO_OP_MENUITEM_CLICK_LISTENER =
96 private List<MenuItem> mShowingMenuItems = new ArrayList<>();
97 private MenuItem.OnMenuItemClickListener mMenuItemClickListener = NO_OP_MENUITEM_CLICK_LISTENER;
124 private final Comparator<MenuItem> mMenuItemComparator = (menuItem1, menuItem2) -> {
176 MenuItem.OnMenuItemClickListener menuItemClickListener) { in setOnMenuItemClickListener()
279 List<MenuItem> menuItems = getVisibleAndEnabledMenuItems(mMenu); in doShow()
298 private boolean isCurrentlyShowing(List<MenuItem> menuItems) { in isCurrentlyShowing()
305 final MenuItem menuItem = menuItems.get(i); in isCurrentlyShowing()
306 final MenuItem showingItem = mShowingMenuItems.get(i); in isCurrentlyShowing()
[all …]
/frameworks/base/core/tests/coretests/src/android/widget/espresso/
DFloatingToolbarEspressoUtils.java34 import android.view.MenuItem;
161 if (view.getTag() instanceof MenuItem) { in assertFloatingToolbarItemIndex()
162 menuItemIds.add(((MenuItem) view.getTag()).getItemId()); in assertFloatingToolbarItemIndex()
181 view.getTag() instanceof MenuItem in assertFloatingToolbarDoesNotContainItem()
182 && itemLabel.equals(((MenuItem) view.getTag()).getTitle().toString()); in assertFloatingToolbarDoesNotContainItem()
194 view.getTag() instanceof MenuItem in assertFloatingToolbarDoesNotContainItem()
195 && ((MenuItem) view.getTag()).getItemId() == menuItemId; in assertFloatingToolbarDoesNotContainItem()
/frameworks/base/packages/SettingsLib/HelpUtils/src/com/android/settingslib/
DHelpUtils.java33 import android.view.MenuItem;
34 import android.view.MenuItem.OnMenuItemClickListener;
76 MenuItem helpItem = menu.add(0, MENU_HELP, 0, R.string.help_feedback_label); in prepareHelpMenuItem()
83 MenuItem helpItem = menu.add(0, MENU_HELP, 0, R.string.help_feedback_label); in prepareHelpMenuItem()
97 public static boolean prepareHelpMenuItem(final Activity activity, MenuItem helpMenuItem, in prepareHelpMenuItem()
116 public boolean onMenuItemClick(MenuItem item) { in prepareHelpMenuItem()
132 helpMenuItem.setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS); in prepareHelpMenuItem()
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/core/lifecycle/events/
DOnOptionsItemSelected.java19 import android.view.MenuItem;
22 boolean onOptionsItemSelected(MenuItem menuItem); in onOptionsItemSelected()
/frameworks/base/tests/TouchLatency/app/src/main/java/com/prefabulated/touchlatency/
DTouchLatencyActivity.java30 import android.view.MenuItem;
204 public void changeMode(MenuItem item) { in changeMode()
260 MenuItem menuItem = menu.findItem(R.id.display_mode); in onCreateOptionsMenu()
269 private void updateDisplayMode(MenuItem menuItem, Mode displayMode) { in updateDisplayMode()
275 public void changeDisplayMode(MenuItem item) { in changeDisplayMode()
289 public boolean onOptionsItemSelected(MenuItem item) { in onOptionsItemSelected()
/frameworks/layoutlib/bridge/tests/res/testApp/MyApplication/src/main/java/com/android/layoutlib/test/myapplication/
DMyActivity.java6 import android.view.MenuItem;
25 public boolean onOptionsItemSelected(MenuItem item) { in onOptionsItemSelected()
/frameworks/base/tests/HierarchyViewerTest/src/com/android/test/hierarchyviewer/
DMainActivity.java7 import android.view.MenuItem;
31 public boolean onOptionsItemSelected(MenuItem item) { in onOptionsItemSelected()
/frameworks/base/core/java/com/android/internal/view/
DStandaloneActionMode.java27 import android.view.MenuItem;
50 MenuItem.SHOW_AS_ACTION_IF_ROOM); in StandaloneActionMode()
133 public boolean onMenuItemSelected(MenuBuilder menu, MenuItem item) { in onMenuItemSelected()

12345