MenuPresenter

A MenuPresenter is responsible for building views for a Menu object. It takes over some responsibility from the old style monolithic MenuBuilder class.

Inheritors

Types

Link copied to clipboard
interface Callback
Called by menu implementation to notify another component of open/close events.

Functions

Link copied to clipboard
Called when a menu item with a collapsible action view should collapse its action view.
Link copied to clipboard
Called when a menu item with a collapsible action view should expand its action view.
Link copied to clipboard
abstract fun flagActionItems(): Boolean
Called by Menu implementations to flag items that will be shown as actions.
Link copied to clipboard
abstract fun getId(): Int
Returns an ID for determining how to save/restore instance state.
Link copied to clipboard
abstract fun getMenuView(root: ViewGroup): MenuView
Retrieve a MenuView to display the menu specified in initForMenu.
Link copied to clipboard
abstract fun initForMenu(context: Context, menu: MenuBuilder)
Initializes this presenter for the given context and menu.
Link copied to clipboard
abstract fun onCloseMenu(menu: MenuBuilder, allMenusAreClosing: Boolean)
Called by Menu implementations to indicate that a menu or submenu is closing.
Link copied to clipboard
abstract fun onRestoreInstanceState(state: Parcelable)
Supplies the previously saved instance state to be restored.
Link copied to clipboard
Returns a Parcelable describing the current state of the presenter.
Link copied to clipboard
abstract fun onSubMenuSelected(subMenu: SubMenuBuilder): Boolean
Called by Menu implementations to indicate that a submenu item has been selected.
Link copied to clipboard
Set a callback object that will be notified of menu events related to this specific presentation.
Link copied to clipboard
abstract fun updateMenuView(cleared: Boolean)
Update the menu UI in response to a change.