An Item is returned by calling one of the IMenuGroup#addItem methods.
For a feature set of specific menu types, see IMenuView.
◆ getContentView()
| View com.foxit.uiextensions.controls.menu.IMenuItem.getContentView |
( |
| ) |
|
Get the root view of the menu item.
- Returns
- The root view of the menu item.
◆ getGroupId()
| int com.foxit.uiextensions.controls.menu.IMenuItem.getGroupId |
( |
| ) |
|
Return the group identifier that this menu item is part of. The group identifier can not be changed after the menu is created.
- Returns
- The menu item's group identifier.
◆ getItemId()
| int com.foxit.uiextensions.controls.menu.IMenuItem.getItemId |
( |
| ) |
|
Return the identifier for this menu item. The identifier can not be changed after the menu is created.
- Returns
- The menu item's identifier.
◆ getMenuGroup()
| IMenuGroup com.foxit.uiextensions.controls.menu.IMenuItem.getMenuGroup |
( |
| ) |
|
- Returns
- Return the group that this menu item is part of.
◆ getTitle()
| CharSequence com.foxit.uiextensions.controls.menu.IMenuItem.getTitle |
( |
| ) |
|
◆ getVisible()
| boolean com.foxit.uiextensions.controls.menu.IMenuItem.getVisible |
( |
| ) |
|
- Returns
- The whether the item is visible
◆ setDividerVisible()
| void com.foxit.uiextensions.controls.menu.IMenuItem.setDividerVisible |
( |
boolean |
visible | ) |
|
Set whether the divider is visible
- Parameters
-
| visible | true display the divider, false otherwise. |
◆ setEnabled()
| void com.foxit.uiextensions.controls.menu.IMenuItem.setEnabled |
( |
boolean |
enabled | ) |
|
Sets whether the menu item is enabled.
- Parameters
-
| enabled | If true then the item will be invokable; if false it is won't be invokable. |
◆ setIcon()
| void com.foxit.uiextensions.controls.menu.IMenuItem.setIcon |
( |
@DrawableRes int |
resId | ) |
|
Set the icon of the item
- Parameters
-
| resId | The resource identifier of the drawable |
◆ setMenuGroup()
| void com.foxit.uiextensions.controls.menu.IMenuItem.setMenuGroup |
( |
IMenuGroup |
menuGroup | ) |
|
Set the menu group for current menu item
- Parameters
-
| menuGroup | The current item's menu group |
◆ setOnMenuItemClickListener()
Register a callback to be invoked when this menu item is clicked. I
- Parameters
-
◆ setSelected()
| void com.foxit.uiextensions.controls.menu.IMenuItem.setSelected |
( |
boolean |
selected | ) |
|
Sets whether the menu item is selected.
- Parameters
-
| selected | true if the view must be selected, false otherwise |
◆ setTitle()
| void com.foxit.uiextensions.controls.menu.IMenuItem.setTitle |
( |
CharSequence |
title | ) |
|
Set title for the item
- Parameters
-
◆ setVisible()
| void com.foxit.uiextensions.controls.menu.IMenuItem.setVisible |
( |
boolean |
visible | ) |
|
Set whether the item is visible
- Parameters
-
| visible | true display the item, false otherwise. |