Example usage for Java android.view ContextMenu 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. |
int | addIntentOptions(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. |
SubMenu | addSubMenu(final int groupId, final int itemId, int order, final CharSequence title) Add a new sub-menu to the menu. |
SubMenu | addSubMenu(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. |
MenuItem | findItem(int id) Return the menu item with a particular identifier. |
MenuItem | getItem(int index) Gets the menu item at the given index. |
boolean | hasVisibleItems() Return whether the menu currently has item items that are visible. |
void | removeItem(int id) Remove the item with the given identifier. |
void | setGroupEnabled(int group, boolean enabled) Enable or disable all menu items that are in the given group. |
void | setGroupVisible(int group, boolean visible) Show or hide all menu items that are in the given group. |
ContextMenu | setHeaderIcon(@DrawableRes int iconRes) Sets the context menu header's icon to the icon given in iconRes resource id. |
ContextMenu | setHeaderIcon(Drawable icon) Sets the context menu header's icon to the icon given in icon Drawable . |
ContextMenu | setHeaderTitle(@StringRes int titleRes) Sets the context menu header's title to the title given in titleRes resource identifier. |
ContextMenu | setHeaderTitle(CharSequence title) Sets the context menu header's title to the title given in title. |
ContextMenu | setHeaderView(View view) Sets the header of the context menu to the View given in view. |
int | size() Get the number of items in the menu. |