public interface

MenuPresenter.Callback

 androidx.appcompat.view.menu.MenuPresenter.Callback

Overview

Called by menu implementation to notify another component of open/close events.

Summary

Methods
public voidonCloseMenu(MenuBuilder menu, boolean allMenusAreClosing)

Called when a menu is closing.

public booleanonOpenSubMenu(MenuBuilder subMenu)

Called when a submenu opens.

Methods

public void onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing)

Called when a menu is closing.

Parameters:

menu:
allMenusAreClosing:

public boolean onOpenSubMenu(MenuBuilder subMenu)

Called when a submenu opens. Useful for notifying the application of menu state so that it does not attempt to hide the action bar while a submenu is open or similar.

Parameters:

subMenu: Submenu currently being opened

Returns:

true if the Callback will handle presenting the submenu, false if the presenter should attempt to do so.