SubMenu
interface SubMenu : Menu
| android.view.SubMenu |
Subclass of Menu for sub menus.
Sub menus do not support item icons, or nested sub menus.
Summary
| Inherited constants | |
|---|---|
| Public methods | |
|---|---|
| abstract Unit |
Clears the header of the submenu. |
| abstract MenuItem! |
getItem()Gets the |
| abstract SubMenu! |
setHeaderIcon(icon: Drawable!)Sets the submenu header's icon to the icon given in icon |
| abstract SubMenu! |
setHeaderIcon(iconRes: Int)Sets the submenu header's icon to the icon given in iconRes resource id. |
| abstract SubMenu! |
setHeaderTitle(titleRes: Int)Sets the submenu header's title to the title given in titleRes resource identifier. |
| abstract SubMenu! |
setHeaderTitle(title: CharSequence!)Sets the submenu header's title to the title given in title. |
| abstract SubMenu! |
setHeaderView(view: View!)Sets the header of the submenu to the |
| abstract SubMenu! |
Change the icon associated with this submenu's item in its parent menu. |
| abstract SubMenu! |
Change the icon associated with this submenu's item in its parent menu. |
| Inherited functions | |
|---|---|
Public methods
getItem
abstract fun getItem(): MenuItem!
Gets the MenuItem that represents this submenu in the parent menu. Use this for setting additional item attributes.
| Return | |
|---|---|
MenuItem! |
The MenuItem that launches the submenu when invoked. |
setHeaderIcon
abstract fun setHeaderIcon(icon: Drawable!): SubMenu!
Sets the submenu header's icon to the icon given in icon Drawable.
| Parameters | |
|---|---|
icon |
Drawable!: The Drawable used for the icon. |
| Return | |
|---|---|
SubMenu! |
This SubMenu so additional setters can be called. |
setHeaderIcon
abstract fun setHeaderIcon(iconRes: Int): SubMenu!
Sets the submenu header's icon to the icon given in iconRes resource id.
| Parameters | |
|---|---|
iconRes |
Int: The resource identifier used for the icon. |
| Return | |
|---|---|
SubMenu! |
This SubMenu so additional setters can be called. |
setHeaderTitle
abstract fun setHeaderTitle(titleRes: Int): SubMenu!
Sets the submenu header's title to the title given in titleRes resource identifier.
| Parameters | |
|---|---|
titleRes |
Int: The string resource identifier used for the title. |
| Return | |
|---|---|
SubMenu! |
This SubMenu so additional setters can be called. |
setHeaderTitle
abstract fun setHeaderTitle(title: CharSequence!): SubMenu!
Sets the submenu header's title to the title given in title.
| Parameters | |
|---|---|
title |
CharSequence!: The character sequence used for the title. |
| Return | |
|---|---|
SubMenu! |
This SubMenu so additional setters can be called. |
setHeaderView
abstract fun setHeaderView(view: View!): SubMenu!
Sets the header of the submenu to the View given in view. This replaces the header title and icon (and those replace this).
| Parameters | |
|---|---|
view |
View!: The View used for the header. |
| Return | |
|---|---|
SubMenu! |
This SubMenu so additional setters can be called. |
setIcon
abstract fun setIcon(icon: Drawable!): SubMenu!
Change the icon associated with this submenu's item in its parent menu.
| Parameters | |
|---|---|
icon |
Drawable!: The new icon (as a Drawable) to be displayed. |
| Return | |
|---|---|
SubMenu! |
This SubMenu so additional setters can be called. |
setIcon
abstract fun setIcon(iconRes: Int): SubMenu!
Change the icon associated with this submenu's item in its parent menu.
| Parameters | |
|---|---|
iconRes |
Int: The new icon (as a resource ID) to be displayed. |
| Return | |
|---|---|
SubMenu! |
This SubMenu so additional setters can be called. |
See Also