Share via


Instrumentation.InvokeMenuActionSync Method

Definition

Execute a particular menu item.

[Android.Runtime.Register("invokeMenuActionSync", "(Landroid/app/Activity;II)Z", "GetInvokeMenuActionSync_Landroid_app_Activity_IIHandler")]
public virtual bool InvokeMenuActionSync (Android.App.Activity? targetActivity, int id, Android.Views.MenuPerformFlags flag);
[<Android.Runtime.Register("invokeMenuActionSync", "(Landroid/app/Activity;II)Z", "GetInvokeMenuActionSync_Landroid_app_Activity_IIHandler")>]
abstract member InvokeMenuActionSync : Android.App.Activity * int * Android.Views.MenuPerformFlags -> bool
override this.InvokeMenuActionSync : Android.App.Activity * int * Android.Views.MenuPerformFlags -> bool

Parameters

targetActivity
Activity

The activity in question.

id
Int32

The identifier associated with the menu item.

flag
MenuPerformFlags

Additional flags, if any.

Returns

Whether the invocation was successful (for example, it could be false if item is disabled).

Attributes

Remarks

Execute a particular menu item.

Java documentation for android.app.Instrumentation.invokeMenuActionSync(android.app.Activity, 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