Example usage for Java android.view SubMenu fields, constructors, methods, implement or subclass
The text is from its open source code.
MenuItem | add(int groupId, int itemId, int order, CharSequence title) Add a new item to the menu. |
MenuItem | add(CharSequence title) Add a new item to the menu. |
SubMenu | addSubMenu(final int groupId, final int itemId, int order, final CharSequence title) Add a new sub-menu to the menu. |
void | clear() Remove all existing items from the menu, leaving it empty as if it had just been created. |
void | clearHeader() Clears the header of the submenu. |
MenuItem | findItem(int id) Return the menu item with a particular identifier. |
MenuItem | getItem(int index) Gets the menu item at the given index. |
MenuItem | getItem() Gets the MenuItem that represents this submenu in the parent menu. |
void | removeGroup(int groupId) Remove all items in the given group. |
void | removeItem(int id) Remove the item with the given identifier. |
void | setGroupCheckable(int group, boolean checkable, boolean exclusive) Control whether a particular group of items can show a check mark. |
void | setGroupEnabled(int group, boolean enabled) Enable or disable all menu items that are in the given group. |
SubMenu | setHeaderIcon(@DrawableRes int iconRes) Sets the submenu header's icon to the icon given in iconRes resource id. |
SubMenu | setHeaderIcon(Drawable icon) Sets the submenu header's icon to the icon given in icon Drawable . |
SubMenu | setHeaderTitle(@StringRes int titleRes) Sets the submenu header's title to the title given in titleRes resource identifier. |
SubMenu | setHeaderTitle(CharSequence title) Sets the submenu header's title to the title given in title. |
SubMenu | setIcon(@DrawableRes int iconRes) Change the icon associated with this submenu's item in its parent menu. |
SubMenu | setIcon(Drawable icon) Change the icon associated with this submenu's item in its parent menu. |
int | size() Get the number of items in the menu. |