Lines Matching defs:item

90      * Whether or not the items (or any one item's shown state) has changed since it was last
106 * Whether or not the items (or any one item's action state) has changed since it was last
156 * Currently expanded menu item; must be collapsed when we clear.
167 * Called when a menu item is selected.
169 * @param menu The menu that is the parent of the item
170 * @param item The menu item that is selected
171 * @return whether the menu item selection was handled
173 public boolean onMenuItemSelected(MenuBuilder menu, MenuItem item);
189 public boolean invokeItem(MenuItemImpl item);
233 final MenuPresenter item = ref.get();
234 if (item == null || item == presenter) {
336 final MenuItem item = getItem(i);
337 final View v = MenuItemCompat.getActionView(item);
343 if (MenuItemCompat.isActionViewExpanded(item)) {
344 outStates.putInt(EXPANDED_ACTION_VIEW_ID, item.getItemId());
347 if (item.hasSubMenu()) {
348 final SubMenuBuilder subMenu = (SubMenuBuilder) item.getSubMenu();
368 final MenuItem item = getItem(i);
369 final View v = MenuItemCompat.getActionView(item);
373 if (item.hasSubMenu()) {
374 final SubMenuBuilder subMenu = (SubMenuBuilder) item.getSubMenu();
397 * Adds an item to the menu. The other add methods funnel to this.
402 final MenuItemImpl item = new MenuItemImpl(this, group, id, categoryOrder,
407 item.setMenuInfo(mCurrentMenuInfo);
410 mItems.add(findInsertIndex(mItems, ordering), item);
413 return item;
448 final MenuItemImpl item = (MenuItemImpl) addInternal(group, id, categoryOrder, title);
449 final SubMenuBuilder subMenu = new SubMenuBuilder(mContext, this, item);
450 item.setSubMenu(subMenu);
479 final MenuItem item = add(group, id, categoryOrder, ri.loadLabel(pm))
483 outSpecificItems[ri.specificIndex] = item;
513 * Remove the item at the given index and optionally forces menu views to update.
515 * @param index The index of the item to be removed. If this index is
555 void setExclusiveItemChecked(MenuItem item) {
556 final int group = item.getGroupId();
569 // Check the item meant to be checked, uncheck the others (that are in the group)
570 curItem.setCheckedInt(curItem == item);
580 MenuItemImpl item = mItems.get(i);
581 if (item.getGroupId() == group) {
582 item.setExclusiveCheckable(exclusive);
583 item.setCheckable(checkable);
597 MenuItemImpl item = mItems.get(i);
598 if (item.getGroupId() == group) {
599 if (item.setVisibleInt(visible)) {
615 MenuItemImpl item = mItems.get(i);
616 if (item.getGroupId() == group) {
617 item.setEnabled(enabled);
627 MenuItemImpl item = mItems.get(i);
628 if (item.isVisible()) {
640 MenuItemImpl item = mItems.get(i);
641 if (item.getItemId() == id) {
642 return item;
643 } else if (item.hasSubMenu()) {
644 MenuItem possibleItem = item.getSubMenu().findItem(id);
659 MenuItemImpl item = mItems.get(i);
660 if (item.getItemId() == id) {
680 final MenuItemImpl item = mItems.get(i);
682 if (item.getGroupId() == group) {
717 * @param categoryOrder The category order for a particular item (if it has not been or/add with
719 * @return An ordering integer that can be used to order this item across all the items (even
743 * @param shortcutsVisible Whether shortcuts should be visible (if true and a menu item does not
744 * have a shortcut defined, that item will still NOT show a shortcut)
776 boolean dispatchMenuItemSelected(MenuBuilder menu, MenuItem item) {
777 return mCallback != null && mCallback.onMenuItemSelected(menu, item);
791 MenuItemImpl item = items.get(i);
792 if (item.getOrdering() <= ordering) {
802 final MenuItemImpl item = findItemWithShortcutForKey(keyCode, event);
806 if (item != null) {
807 handled = performItemAction(item, flags);
835 // Look for an item whose shortcut is this key.
838 MenuItemImpl item = mItems.get(i);
839 if (item.hasSubMenu()) {
840 ((MenuBuilder) item.getSubMenu())
843 final char shortcutChar = qwerty ? item.getAlphabeticShortcut()
844 : item.getNumericShortcut();
851 item.isEnabled()) {
852 items.add(item);
858 * We want to return the menu item associated with the key, but if there is no
859 * ambiguity (i.e. there is only one menu item corresponding to the key) we want
891 // If we found more than one item associated with the key,
894 final MenuItemImpl item = items.get(i);
895 final char shortcutChar = qwerty ? item.getAlphabeticShortcut() :
896 item.getNumericShortcut();
903 return item;
911 // Look for an item whose identifier is the id.
915 public boolean performItemAction(MenuItem item, int flags) {
916 MenuItemImpl itemImpl = (MenuItemImpl) item;
986 * Called when an item is added or removed.
988 * @param structureChanged true if the menu structure changed, false if only item properties
1006 * Stop dispatching item changed events to presenters until {@link
1029 * @param item The item that has gone through a visibility change.
1031 void onItemVisibleChanged(MenuItemImpl item) {
1040 * @param item The item that has gone through a change in action request status.
1042 void onItemActionRequestChanged(MenuItemImpl item) {
1057 MenuItemImpl item;
1059 item = mItems.get(i);
1060 if (item.isVisible()) {
1061 mVisibleItems.add(item);
1078 * menu button itself. This is a soft limit; if an item shares a group ID with an item
1079 * previously included as an action item, the new item will stay with its group and become
1080 * an action item itself even if it breaks the max item count limit. This is done to
1086 * limit may be broken by a single item that exceeds the remaining space, but no further
1087 * items may be added. If an item that is part of a group cannot fit within the remaining
1117 MenuItemImpl item = visibleItems.get(i);
1118 if (item.isActionButton()) {
1119 mActionItems.add(item);
1121 mNonActionItems.add(item);
1125 // Nobody flagged anything, everything is a non-action item.
1126 // (This happens during a first pass with no action-item presenters.)
1266 * again with different menu info, in which case that one will be added to all subsequent item
1283 public boolean expandItemActionView(MenuItemImpl item) {
1295 } else if ((expanded = presenter.expandItemActionView(this, item))) {
1302 mExpandedItem = item;
1307 public boolean collapseItemActionView(MenuItemImpl item) {
1308 if (mPresenters.isEmpty() || mExpandedItem != item) {
1319 } else if ((collapsed = presenter.collapseItemActionView(this, item))) {