/** * @return Whether this menu item should be showing shortcuts (depends on whether the menu should * show shortcuts and whether this item has a shortcut defined) */ boolean shouldShowShortcut() { // Show shortcuts if the menu is supposed to show shortcuts AND this item has a shortcut return mMenu.isShortcutsVisible() && (getShortcut() != 0); }