Lines Matching defs:item

109      * Whether or not the items (or any one item's shown state) has changed since it was last
125 * Whether or not the items (or any one item's action state) has changed since it was last
178 * Currently expanded menu item; must be collapsed when we clear.
196 * Called when a menu item is selected.
198 * @param menu The menu that is the parent of the item
199 * @param item The menu item that is selected
200 * @return whether the menu item selection was handled
202 boolean onMenuItemSelected(MenuBuilder menu, MenuItem item);
218 boolean invokeItem(MenuItemImpl item);
274 final MenuPresenter item = ref.get();
275 if (item == null || item == presenter) {
375 final MenuItem item = getItem(i);
376 final View v = MenuItemCompat.getActionView(item);
382 if (MenuItemCompat.isActionViewExpanded(item)) {
383 outStates.putInt(EXPANDED_ACTION_VIEW_ID, item.getItemId());
386 if (item.hasSubMenu()) {
387 final SubMenuBuilder subMenu = (SubMenuBuilder) item.getSubMenu();
407 final MenuItem item = getItem(i);
408 final View v = MenuItemCompat.getActionView(item);
412 if (item.hasSubMenu()) {
413 final SubMenuBuilder subMenu = (SubMenuBuilder) item.getSubMenu();
436 * Adds an item to the menu. The other add methods funnel to this.
441 final MenuItemImpl item = createNewMenuItem(group, id, categoryOrder, ordering, title,
446 item.setMenuInfo(mCurrentMenuInfo);
449 mItems.add(findInsertIndex(mItems, ordering), item);
452 return item;
493 final MenuItemImpl item = (MenuItemImpl) addInternal(group, id, categoryOrder, title);
494 final SubMenuBuilder subMenu = new SubMenuBuilder(mContext, this, item);
495 item.setSubMenu(subMenu);
524 final MenuItem item = add(group, id, categoryOrder, ri.loadLabel(pm))
528 outSpecificItems[ri.specificIndex] = item;
558 * Remove the item at the given index and optionally forces menu views to
561 * @param index The index of the item to be removed. If this index is
598 void setExclusiveItemChecked(MenuItem item) {
599 final int group = item.getGroupId();
608 // Check the item meant to be checked, uncheck the others (that are in the group)
609 curItem.setCheckedInt(curItem == item);
619 MenuItemImpl item = mItems.get(i);
620 if (item.getGroupId() == group) {
621 item.setExclusiveCheckable(exclusive);
622 item.setCheckable(checkable);
636 MenuItemImpl item = mItems.get(i);
637 if (item.getGroupId() == group) {
638 if (item.setVisibleInt(visible)) changedAtLeastOneItem = true;
650 MenuItemImpl item = mItems.get(i);
651 if (item.getGroupId() == group) {
652 item.setEnabled(enabled);
666 MenuItemImpl item = mItems.get(i);
667 if (item.isVisible()) {
679 MenuItemImpl item = mItems.get(i);
680 if (item.getItemId() == id) {
681 return item;
682 } else if (item.hasSubMenu()) {
683 MenuItem possibleItem = item.getSubMenu().findItem(id);
698 MenuItemImpl item = mItems.get(i);
699 if (item.getItemId() == id) {
719 final MenuItemImpl item = mItems.get(i);
721 if (item.getGroupId() == group) {
756 * @param categoryOrder The category order for a particular item (if it has
759 * @return An ordering integer that can be used to order this item across
783 * @param shortcutsVisible Whether shortcuts should be visible (if true and a menu item does not
784 * have a shortcut defined, that item will still NOT show a shortcut)
816 boolean dispatchMenuItemSelected(MenuBuilder menu, MenuItem item) {
817 return mCallback != null && mCallback.onMenuItemSelected(menu, item);
831 MenuItemImpl item = items.get(i);
832 if (item.getOrdering() <= ordering) {
842 final MenuItemImpl item = findItemWithShortcutForKey(keyCode, event);
846 if (item != null) {
847 handled = performItemAction(item, flags);
875 // Look for an item whose shortcut is this key.
878 MenuItemImpl item = mItems.get(i);
879 if (item.hasSubMenu()) {
880 ((MenuBuilder)item.getSubMenu()).findItemsWithShortcutForKey(items, keyCode, event);
882 final char shortcutChar = qwerty ? item.getAlphabeticShortcut() : item.getNumericShortcut();
889 item.isEnabled()) {
890 items.add(item);
896 * We want to return the menu item associated with the key, but if there is no
897 * ambiguity (i.e. there is only one menu item corresponding to the key) we want
929 // If we found more than one item associated with the key,
932 final MenuItemImpl item = items.get(i);
933 final char shortcutChar = qwerty ? item.getAlphabeticShortcut() :
934 item.getNumericShortcut();
941 return item;
949 // Look for an item whose identifier is the id.
953 public boolean performItemAction(MenuItem item, int flags) {
954 return performItemAction(item, null, flags);
957 public boolean performItemAction(MenuItem item, MenuPresenter preferredPresenter, int flags) {
958 MenuItemImpl itemImpl = (MenuItemImpl) item;
1004 * should be completely closed (as when a menu item is
1029 * Called when an item is added or removed.
1032 * false if only item properties changed.
1049 * Stop dispatching item changed events to presenters until
1072 * @param item The item that has gone through a visibility change.
1074 void onItemVisibleChanged(MenuItemImpl item) {
1083 * @param item The item that has gone through a change in action request status.
1085 void onItemActionRequestChanged(MenuItemImpl item) {
1099 MenuItemImpl item;
1101 item = mItems.get(i);
1102 if (item.isVisible()) mVisibleItems.add(item);
1118 * menu button itself. This is a soft limit; if an item shares a group ID with an item
1119 * previously included as an action item, the new item will stay with its group and become
1120 * an action item itself even if it breaks the max item count limit. This is done to
1126 * limit may be broken by a single item that exceeds the remaining space, but no further
1127 * items may be added. If an item that is part of a group cannot fit within the remaining
1160 MenuItemImpl item = visibleItems.get(i);
1161 if (item.isActionButton()) {
1162 mActionItems.add(item);
1164 mNonActionItems.add(item);
1168 // Nobody flagged anything, everything is a non-action item.
1169 // (This happens during a first pass with no action-item presenters.)
1309 * one will be added to all subsequent item additions).
1325 public boolean expandItemActionView(MenuItemImpl item) {
1335 } else if ((expanded = presenter.expandItemActionView(this, item))) {
1342 mExpandedItem = item;
1347 public boolean collapseItemActionView(MenuItemImpl item) {
1348 if (mPresenters.isEmpty() || mExpandedItem != item) return false;
1357 } else if ((collapsed = presenter.collapseItemActionView(this, item))) {