Dela via


IMenuItem.CollapseActionView Method

Definition

Collapse the action view associated with this menu item.

[Android.Runtime.Register("collapseActionView", "()Z", "GetCollapseActionViewHandler:Android.Views.IMenuItemInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public bool CollapseActionView ();
[<Android.Runtime.Register("collapseActionView", "()Z", "GetCollapseActionViewHandler:Android.Views.IMenuItemInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member CollapseActionView : unit -> bool

Returns

true if the action view was collapsed, false otherwise.

Attributes

Remarks

Collapse the action view associated with this menu item. The menu item must have an action view set, as well as the showAsAction flag #SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW. If a listener has been set using #setOnActionExpandListener(OnActionExpandListener) it will have its OnActionExpandListener#onMenuItemActionCollapse(MenuItem) method invoked. The listener may return false from this method to prevent collapsing the action view.

Java documentation for android.view.MenuItem.collapseActionView().

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