次の方法で共有


IMenuItem.SetShowAsActionFlags(ShowAsAction) Method

Definition

Sets how this item should display in the presence of an Action Bar.

[Android.Runtime.Register("setShowAsActionFlags", "(I)Landroid/view/MenuItem;", "GetSetShowAsActionFlags_IHandler:Android.Views.IMenuItemInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public Android.Views.IMenuItem SetShowAsActionFlags (Android.Views.ShowAsAction actionEnum);
[<Android.Runtime.Register("setShowAsActionFlags", "(I)Landroid/view/MenuItem;", "GetSetShowAsActionFlags_IHandler:Android.Views.IMenuItemInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member SetShowAsActionFlags : Android.Views.ShowAsAction -> Android.Views.IMenuItem

Parameters

actionEnum
ShowAsAction

How the item should display. One of #SHOW_AS_ACTION_ALWAYS, #SHOW_AS_ACTION_IF_ROOM, or #SHOW_AS_ACTION_NEVER. SHOW_AS_ACTION_NEVER is the default.

Returns

This MenuItem instance for call chaining.

Attributes

Remarks

Sets how this item should display in the presence of an Action Bar. The parameter actionEnum is a flag set. One of #SHOW_AS_ACTION_ALWAYS, #SHOW_AS_ACTION_IF_ROOM, or #SHOW_AS_ACTION_NEVER should be used, and you may optionally OR the value with #SHOW_AS_ACTION_WITH_TEXT. SHOW_AS_ACTION_WITH_TEXT requests that when the item is shown as an action, it should be shown with a text label.

Note: This method differs from #setShowAsAction(int) only in that it returns the current MenuItem instance for call chaining.

Java documentation for android.view.MenuItem.setShowAsActionFlags(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

See also