Android Guides | Samples

Android.Views.IContextMenu

Extension of Menu for context menus providing functionality to modify the header of the context menu.

See Also: IContextMenu

Syntax

[Android.Runtime.Register("android/view/ContextMenu", "", "Android.Views.IContextMenuInvoker")]
public interface IContextMenu : IMenu, IDisposable

Remarks

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.

To show a context menu on long click, most clients will want to call Activity.RegisterForContextMenu(View) and override Activity.OnCreateContextMenu(IContextMenu,View,View).

Developer Guides

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

[Android Documentation]

Requirements

Namespace: Android.Views
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1

The members of Android.Views.IContextMenu are listed below.

Public Methods

ClearHeader()
Clears the header of the context menu.
SetHeaderIcon(Drawable) : IContextMenu
Sets the context menu header's icon to the icon given in iconDrawable.
SetHeaderIcon(Int32) : IContextMenu
Sets the context menu header's icon to the icon given in iconRes resource id.
SetHeaderTitle(ICharSequence) : IContextMenu
Sets the context menu header's title to the title given in title.
SetHeaderTitle(Int32) : IContextMenu
Sets the context menu header's title to the title given in titleRes resource identifier.
SetHeaderView(View) : IContextMenu
Sets the header of the context menu to the View given in view.