Java android.view ContextMenu fields, constructors, methods, implement or subclass

Example usage for Java android.view ContextMenu fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for android.view ContextMenu.

The text is from its open source code.

Method

MenuItemadd(int groupId, int itemId, int order, CharSequence title)
Add a new item to the menu.
MenuItemadd(CharSequence title)
Add a new item to the menu.
intaddIntentOptions(int groupId, int itemId, int order, ComponentName caller, Intent[] specifics, Intent intent, int flags, MenuItem[] outSpecificItems)
Add a group of menu items corresponding to actions that can be performed for a particular Intent.
SubMenuaddSubMenu(final int groupId, final int itemId, int order, final CharSequence title)
Add a new sub-menu to the menu.
SubMenuaddSubMenu(final CharSequence title)
Add a new sub-menu to the menu.
voidclear()
Remove all existing items from the menu, leaving it empty as if it had just been created.
MenuItemfindItem(int id)
Return the menu item with a particular identifier.
MenuItemgetItem(int index)
Gets the menu item at the given index.
booleanhasVisibleItems()
Return whether the menu currently has item items that are visible.
voidremoveItem(int id)
Remove the item with the given identifier.
voidsetGroupEnabled(int group, boolean enabled)
Enable or disable all menu items that are in the given group.
voidsetGroupVisible(int group, boolean visible)
Show or hide all menu items that are in the given group.
ContextMenusetHeaderIcon(@DrawableRes int iconRes)
Sets the context menu header's icon to the icon given in iconRes resource id.
ContextMenusetHeaderIcon(Drawable icon)
Sets the context menu header's icon to the icon given in icon Drawable .
ContextMenusetHeaderTitle(@StringRes int titleRes)
Sets the context menu header's title to the title given in titleRes resource identifier.
ContextMenusetHeaderTitle(CharSequence title)
Sets the context menu header's title to the title given in title.
ContextMenusetHeaderView(View view)
Sets the header of the context menu to the View given in view.
intsize()
Get the number of items in the menu.