Share via


IMenuItem.SetActionProvider(ActionProvider) Method

Definition

Sets the ActionProvider responsible for creating an action view if the item is placed on the action bar.

[Android.Runtime.Register("setActionProvider", "(Landroid/view/ActionProvider;)Landroid/view/MenuItem;", "GetSetActionProvider_Landroid_view_ActionProvider_Handler:Android.Views.IMenuItemInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public Android.Views.IMenuItem SetActionProvider (Android.Views.ActionProvider? actionProvider);
[<Android.Runtime.Register("setActionProvider", "(Landroid/view/ActionProvider;)Landroid/view/MenuItem;", "GetSetActionProvider_Landroid_view_ActionProvider_Handler:Android.Views.IMenuItemInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member SetActionProvider : Android.Views.ActionProvider -> Android.Views.IMenuItem

Parameters

actionProvider
ActionProvider

The action provider.

Returns

This Item so additional setters can be called.

Attributes

Remarks

Sets the ActionProvider responsible for creating an action view if the item is placed on the action bar. The provider also provides a default action invoked if the item is placed in the overflow menu.

<strong>Note:</strong> Setting an action provider overrides the action view set via #setActionView(int) or #setActionView(View).

Java documentation for android.view.MenuItem.setActionProvider(android.view.ActionProvider).

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

See also