public final class BottomNavigationMenu extends MenuBuilder
MenuBuilder.Callback, MenuBuilder.ItemInvoker
Modifier and Type | Field and Description |
---|---|
static int |
MAX_ITEM_COUNT |
CATEGORY_MASK, CATEGORY_SHIFT, FLAG_KEEP_OPEN_ON_SUBMENU_OPENED, USER_MASK, USER_SHIFT
CATEGORY_ALTERNATIVE, CATEGORY_CONTAINER, CATEGORY_SECONDARY, CATEGORY_SYSTEM, FIRST, FLAG_ALWAYS_PERFORM_CLOSE, FLAG_APPEND_TO_GROUP, FLAG_PERFORM_NO_CLOSE, NONE
Constructor and Description |
---|
BottomNavigationMenu(Context context) |
Modifier and Type | Method and Description |
---|---|
protected MenuItem |
addInternal(int group,
int id,
int categoryOrder,
CharSequence title)
Adds an item to the menu.
|
SubMenu |
addSubMenu(int group,
int id,
int categoryOrder,
CharSequence title)
Add a new sub-menu to the menu.
|
add, add, add, add, addIntentOptions, addMenuPresenter, addMenuPresenter, addSubMenu, addSubMenu, addSubMenu, changeMenuMode, clear, clearAll, clearHeader, close, close, collapseItemActionView, expandItemActionView, findGroupIndex, findGroupIndex, findItem, findItemIndex, flagActionItems, getActionItems, getActionViewStatesKey, getContext, getExpandedItem, getHeaderIcon, getHeaderTitle, getHeaderView, getItem, getNonActionItems, getRootMenu, getVisibleItems, hasVisibleItems, isShortcutKey, isShortcutsVisible, onItemsChanged, performIdentifierAction, performItemAction, performItemAction, performShortcut, removeGroup, removeItem, removeItemAt, removeMenuPresenter, restoreActionViewStates, restorePresenterStates, saveActionViewStates, savePresenterStates, setCallback, setCurrentMenuInfo, setDefaultShowAsAction, setGroupCheckable, setGroupEnabled, setGroupVisible, setHeaderIconInt, setHeaderIconInt, setHeaderTitleInt, setHeaderTitleInt, setHeaderViewInt, setOptionalIconsVisible, setOverrideVisibleItems, setQwertyMode, setShortcutsVisible, size, startDispatchingItemsChanged, stopDispatchingItemsChanged
public static final int MAX_ITEM_COUNT
public BottomNavigationMenu(Context context)
public SubMenu addSubMenu(int group, int id, int categoryOrder, CharSequence title)
Menu
SubMenu.getItem()
.
Note that you can only have one level of sub-menus, i.e. you cannnot add
a subMenu to a subMenu: An UnsupportedOperationException
will be
thrown if you try.
addSubMenu
in interface Menu
addSubMenu
in class MenuBuilder
group
- The group identifier that this item should be part of.
This can also be used to define groups of items for batch state
changes. Normally use Menu.NONE
if an item should not be in a
group.id
- Unique item ID. Use Menu.NONE
if you do not need a
unique ID.categoryOrder
- The order for the item. Use Menu.NONE
if you do not care
about the order. See MenuItem.getOrder()
.title
- The text to display for the item.protected MenuItem addInternal(int group, int id, int categoryOrder, CharSequence title)
MenuBuilder
addInternal
in class MenuBuilder