Aracılığıyla paylaş


IMenuItem.SetShortcut Method

Definition

Overloads

SetShortcut(Char, Char)

Change both the numeric and alphabetic shortcut associated with this item.

SetShortcut(Char, Char, Int32, Int32)

Change both the numeric and alphabetic shortcut associated with this item.

SetShortcut(Char, Char)

Change both the numeric and alphabetic shortcut associated with this item.

[Android.Runtime.Register("setShortcut", "(CC)Landroid/view/MenuItem;", "GetSetShortcut_CCHandler:Android.Views.IMenuItemInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public Android.Views.IMenuItem SetShortcut (char numericChar, char alphaChar);
[<Android.Runtime.Register("setShortcut", "(CC)Landroid/view/MenuItem;", "GetSetShortcut_CCHandler:Android.Views.IMenuItemInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member SetShortcut : char * char -> Android.Views.IMenuItem

Parameters

numericChar
Char

The numeric shortcut key. This is the shortcut when using a numeric (e.g., 12-key) keyboard.

alphaChar
Char

The alphabetic shortcut key. This is the shortcut when using a keyboard with alphabetic keys.

Returns

This Item so additional setters can be called.

Attributes

Remarks

Change both the numeric and alphabetic shortcut associated with this item. Note that the shortcut will be triggered when the key that generates the given character is pressed along with the corresponding modifier key. The default modifier is KeyEvent#META_CTRL_ON in case nothing is specified. Also note that case is not significant and that alphabetic shortcut characters will be handled in lower case.

See Menu for the menu types that support shortcuts.

Java documentation for android.view.MenuItem.setShortcut(char, char).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

SetShortcut(Char, Char, Int32, Int32)

Change both the numeric and alphabetic shortcut associated with this item.

[Android.Runtime.Register("setShortcut", "(CCII)Landroid/view/MenuItem;", "GetSetShortcut_CCIIHandler:Android.Views.IMenuItem, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)]
public virtual Android.Views.IMenuItem SetShortcut (char numericChar, char alphaChar, int numericModifiers, int alphaModifiers);
[<Android.Runtime.Register("setShortcut", "(CCII)Landroid/view/MenuItem;", "GetSetShortcut_CCIIHandler:Android.Views.IMenuItem, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)>]
abstract member SetShortcut : char * char * int * int -> Android.Views.IMenuItem
override this.SetShortcut : char * char * int * int -> Android.Views.IMenuItem

Parameters

numericChar
Char

The numeric shortcut key. This is the shortcut when using a numeric (e.g., 12-key) keyboard.

alphaChar
Char

The alphabetic shortcut key. This is the shortcut when using a keyboard with alphabetic keys.

numericModifiers
Int32

The numeric modifier associated with the shortcut. It should be a combination of KeyEvent#META_META_ON, KeyEvent#META_CTRL_ON, KeyEvent#META_ALT_ON, KeyEvent#META_SHIFT_ON, KeyEvent#META_SYM_ON, KeyEvent#META_FUNCTION_ON.

alphaModifiers
Int32

The alphabetic modifier associated with the shortcut. It should be a combination of KeyEvent#META_META_ON, KeyEvent#META_CTRL_ON, KeyEvent#META_ALT_ON, KeyEvent#META_SHIFT_ON, KeyEvent#META_SYM_ON, KeyEvent#META_FUNCTION_ON.

Returns

This Item so additional setters can be called.

Attributes

Remarks

Change both the numeric and alphabetic shortcut associated with this item. Note that the shortcut will be triggered when the key that generates the given character is pressed along with the corresponding modifier key. Also note that case is not significant and that alphabetic shortcut characters will be handled in lower case.

See Menu for the menu types that support shortcuts.

Java documentation for android.view.MenuItem.setShortcut(char, char, int, int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to