MenuService

@IviExperimental(reasons = [])
interface MenuService

This service is responsible for providing the MenuItems to show in a menu frontend and indicating which (if any) MenuItem is currently selected.

Types

Link copied to clipboard
object Companion
Link copied to clipboard

The visibility of the menu item labels. When ADAPTIVE a frontend chooses whether to display the labels based on the available space.

Properties

Link copied to clipboard

Whether labels should be shown next to menu items when presented by a menu frontend.

Link copied to clipboard
abstract val menuItems: List<MenuItem>

The list of MenuItems to display in a menu frontend.

Link copied to clipboard

The MenuItem.Id of the currently selected MenuItem or null if no MenuItem is selected.

Functions

Link copied to clipboard
abstract suspend fun onFrontendFocused(id: MenuItem.Id?)

Should be called when the frontend focus in the system UI has changed. id is the menu item that users use to access the focused frontend. id can be null to indicate that the focused frontend does not have a menu item.

Link copied to clipboard
abstract suspend fun onMenuItemClicked(id: MenuItem.Id)

May be called upon clicking a MenuItem in a menu frontend.

Link copied to clipboard

Debug API, set the visibility of the labels