Package icyllis.modernui.view

# Interface ContextMenu

All Superinterfaces:
  `Menu`

All Known Implementing Classes:
  `ContextMenuBuilder`

public interface ContextMenu extends Menu
Extension of `Menu` for context menus providing functionality to modify the header of the context menu.

Context menus do not support item shortcuts and item icons.

### Developer Guides

For information about creating menus, read the Menus developer guide.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Interface
  Description
  `static interface`
  `ContextMenu.ContextMenuInfo`
  Additional information regarding the creation of the context menu.

- ## Field Summary

  ### Fields inherited from interface icyllis.modernui.view.Menu

  `CATEGORY_ALTERNATIVE, CATEGORY_CONTAINER, CATEGORY_MASK, CATEGORY_SECONDARY, CATEGORY_SHIFT, CATEGORY_SYSTEM, FIRST, FLAG_ALWAYS_PERFORM_CLOSE, FLAG_PERFORM_NO_CLOSE, NONE, SUPPORTED_MODIFIERS_MASK, USER_MASK, USER_SHIFT`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `clearHeader()`
  Clears the header of the context menu.
  `ContextMenu`
  `setHeaderIcon(Drawable icon)`
  Sets the context menu header's icon to the icon given in icon `Drawable`.
  `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.

  ### Methods inherited from interface icyllis.modernui.view.Menu

  `add, add, addSubMenu, addSubMenu, clear, close, findItem, getItem, hasVisibleItems, isShortcutKey, performIdentifierAction, performShortcut, removeGroup, removeItem, setGroupCheckable, setGroupDividerEnabled, setGroupEnabled, setGroupVisible, setQwertyMode, size`

- ## Method Details

  - ### setHeaderTitle

    @NonNull ContextMenu setHeaderTitle(CharSequence title)
    Sets the context menu header's title to the title given in title.
    Parameters:
      `title` - The character sequence used for the title.
    Returns:
      This ContextMenu so additional setters can be called.

  - ### setHeaderIcon

    @NonNull ContextMenu setHeaderIcon(Drawable icon)
    Sets the context menu header's icon to the icon given in icon `Drawable`.
    Parameters:
      `icon` - The `Drawable` used for the icon.
    Returns:
      This ContextMenu so additional setters can be called.

  - ### setHeaderView

    @NonNull ContextMenu setHeaderView(View view)
    Sets the header of the context menu 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 ContextMenu so additional setters can be called.

  - ### clearHeader

    void clearHeader()
    Clears the header of the context menu.