Save the date! Android Dev Summit is coming to Sunnyvale, CA on Oct 23-24, 2019.

OnActionExpandListener

interface OnActionExpandListener
androidx.core.view.MenuItemCompat.OnActionExpandListener

Interface definition for a callback to be invoked when a menu item marked with is expanded or collapsed.

Summary

Public methods
abstract Boolean

Called when a menu item with SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW is collapsed.

abstract Boolean

Called when a menu item with SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW is expanded.

Public methods

onMenuItemActionCollapse

abstract fun onMenuItemActionCollapse(item: MenuItem!): Boolean

Called when a menu item with SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW is collapsed.

Parameters
item MenuItem!: Item that was collapsed
Return
Boolean: true if the item should collapse, false if collapsing should be suppressed.

onMenuItemActionExpand

abstract fun onMenuItemActionExpand(item: MenuItem!): Boolean

Called when a menu item with SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW is expanded.

Parameters
item MenuItem!: Item that was expanded
Return
Boolean: true if the item should expand, false if expansion should be suppressed.