Build 1.0_r1(from source)

android.view
Interface SubMenu

All Superinterfaces:
Menu

public interface SubMenu
extends Menu

Subclass of Menu for sub menus.

Sub menus do not support item icons, or nested sub menus.


Field Summary
 
Fields inherited from interface android.view.Menu
CATEGORY_ALTERNATIVE, CATEGORY_CONTAINER, CATEGORY_MASK, CATEGORY_SECONDARY, CATEGORY_SHIFT, CATEGORY_SYSTEM, FIRST, FLAG_ALWAYS_PERFORM_CLOSE, FLAG_APPEND_TO_GROUP, FLAG_PERFORM_NO_CLOSE, NONE, USER_MASK, USER_SHIFT
 
Method Summary
 void clearHeader()
          Clears the header of the submenu.
 MenuItem getItem()
          Gets the MenuItem that represents this submenu in the parent menu.
 SubMenu setHeaderIcon(Drawable icon)
          Sets the submenu header's icon to the icon given in icon Drawable.
 SubMenu setHeaderIcon(int iconRes)
          Sets the submenu header's icon to the icon given in iconRes resource id.
 SubMenu setHeaderTitle(CharSequence title)
          Sets the submenu header's title to the title given in title.
 SubMenu setHeaderTitle(int titleRes)
          Sets the submenu header's title to the title given in titleRes resource identifier.
 SubMenu setHeaderView(View view)
          Sets the header of the submenu to the View given in view.
 SubMenu setIcon(Drawable icon)
          Change the icon associated with this submenu's item in its parent menu.
 SubMenu setIcon(int iconRes)
          Change the icon associated with this submenu's item in its parent menu.
 
Methods inherited from interface android.view.Menu
add, add, add, add, addIntentOptions, addSubMenu, addSubMenu, addSubMenu, addSubMenu, clear, findItem, hasVisibleItems, isShortcutKey, performIdentifierAction, performShortcut, removeGroup, removeItem, setGroupCheckable, setGroupEnabled, setGroupVisible, setQwertyMode, size
 

Method Detail

setHeaderTitle

SubMenu setHeaderTitle(int titleRes)
Sets the submenu header's title to the title given in titleRes resource identifier.

Parameters:
titleRes - The string resource identifier used for the title.
Returns:
This SubMenu so additional setters can be called.

setHeaderTitle

SubMenu setHeaderTitle(CharSequence title)
Sets the submenu header's title to the title given in title.

Parameters:
title - The character sequence used for the title.
Returns:
This SubMenu so additional setters can be called.

setHeaderIcon

SubMenu setHeaderIcon(int iconRes)
Sets the submenu header's icon to the icon given in iconRes resource id.

Parameters:
iconRes - The resource identifier used for the icon.
Returns:
This SubMenu so additional setters can be called.

setHeaderIcon

SubMenu setHeaderIcon(Drawable icon)
Sets the submenu header's icon to the icon given in icon Drawable.

Parameters:
icon - The Drawable used for the icon.
Returns:
This SubMenu so additional setters can be called.

setHeaderView

SubMenu setHeaderView(View view)
Sets the header of the submenu to the View given in view. This replaces the header title and icon (and those replace this).

Parameters:
view - The View used for the header.
Returns:
This SubMenu so additional setters can be called.

clearHeader

void clearHeader()
Clears the header of the submenu.


setIcon

SubMenu setIcon(int iconRes)
Change the icon associated with this submenu's item in its parent menu.

Parameters:
iconRes - The new icon (as a resource ID) to be displayed.
Returns:
This SubMenu so additional setters can be called.
See Also:
MenuItem.setIcon(int)

setIcon

SubMenu setIcon(Drawable icon)
Change the icon associated with this submenu's item in its parent menu.

Parameters:
icon - The new icon (as a Drawable) to be displayed.
Returns:
This SubMenu so additional setters can be called.
See Also:
MenuItem.setIcon(Drawable)

getItem

MenuItem getItem()
Gets the MenuItem that represents this submenu in the parent menu. Use this for setting additional item attributes.

Returns:
The MenuItem that launches the submenu when invoked.

Build 1.0_r1(from source)

Please submit a feedback, bug or feature