subMenu

fun MenuItem.subMenu(style: String = defaultStyle, init: PopupMenu.() -> Unit = {}): PopupMenu

Creates and assigns new submenu to this MenuItem.

Return

a new instance of PopupMenu set as a submenu of this MenuItem.

Parameters

style

name of the PopupMenu.PopupMenuStyle.

init

allows to customize the PopupMenu.