Control MoreMenuModule group and group's submenus display and hide, as well as add group ,or group submenus to the MoreMenuModule
You can use it through MoreMenuModule#getMenuView(), or UIExtensionsManager#getMenuView()
◆ addClosedListener()
void com.foxit.uiextensions.controls.menu.IMenuView.addClosedListener |
( |
OnClosedListener |
closedListener | ) |
|
Add a listener to be invoked when the menu view is closed.
- Parameters
-
◆ addGroup() [1/2]
IMenuGroup com.foxit.uiextensions.controls.menu.IMenuView.addGroup |
( |
CharSequence |
title | ) |
|
Add a new group to the menu view. This group displays the given title for its label.
- Parameters
-
title | the group title string. |
- Returns
- The newly added menu group.
◆ addGroup() [2/2]
IMenuGroup com.foxit.uiextensions.controls.menu.IMenuView.addGroup |
( |
int |
groupId, |
|
|
CharSequence |
title |
|
) |
| |
Add a new group to the menu view. This group displays the given title for its label.
- Parameters
-
- Returns
- The newly added menu group.
◆ addGroupAt() [1/2]
IMenuGroup com.foxit.uiextensions.controls.menu.IMenuView.addGroupAt |
( |
int |
index, |
|
|
CharSequence |
title |
|
) |
| |
Add a new group to the menu view. This group displays the given title for its label.
- Parameters
-
index | the position at which to add the group item |
title | the group title string. |
- Returns
- The newly added menu group.
- Exceptions
-
IndexOutOfBoundsException | when |
◆ addGroupAt() [2/2]
IMenuGroup com.foxit.uiextensions.controls.menu.IMenuView.addGroupAt |
( |
int |
index, |
|
|
int |
groupId, |
|
|
CharSequence |
title |
|
) |
| |
Add a new group to the menu view. This group displays the given title for its label.
- Parameters
-
index | the position at which to add the group item |
groupId | Unique group ID. This can be used to define groups of items for batch state changes. Please refer to existing groups MoreMenuConstants#GROUP_ACTION_MENU_PRIMARY |
title | the group title string. |
- Returns
- The newly added menu group.
- Exceptions
-
IndexOutOfBoundsException | when |
◆ close()
void com.foxit.uiextensions.controls.menu.IMenuView.close |
( |
| ) |
|
◆ getContentView()
View com.foxit.uiextensions.controls.menu.IMenuView.getContentView |
( |
| ) |
|
the content view of the menu.
◆ getGroup()
IMenuGroup com.foxit.uiextensions.controls.menu.IMenuView.getGroup |
( |
int |
groupId | ) |
|
Gets the group item by the given id.
- Parameters
-
- Returns
- The group item.
◆ getGroupAt()
IMenuGroup com.foxit.uiextensions.controls.menu.IMenuView.getGroupAt |
( |
int |
index | ) |
|
Gets the group item at the given index.
- Parameters
-
index | The index of the group item to return. |
- Returns
- The group item.
- Exceptions
-
IndexOutOfBoundsException | when |
◆ getGroups()
List<IMenuGroup> com.foxit.uiextensions.controls.menu.IMenuView.getGroups |
( |
| ) |
|
- Returns
- the all groups under the current menu view
◆ removeGroup() [1/2]
void com.foxit.uiextensions.controls.menu.IMenuView.removeGroup |
( |
IMenuGroup |
group | ) |
|
Remove all items in the given group, include the group item.
- Parameters
-
group | The group to be removed. |
◆ removeGroup() [2/2]
void com.foxit.uiextensions.controls.menu.IMenuView.removeGroup |
( |
int |
groupId | ) |
|
Remove all items in the given group, include the group item.
- Parameters
-
groupId | The group to be removed. If there is no such group id, nothing happens. |
◆ removeGroupAt()
void com.foxit.uiextensions.controls.menu.IMenuView.removeGroupAt |
( |
int |
index | ) |
|
Remove all items in the specified position group, include the group item.
- Parameters
-
index | the position in the group of the menu to remove |
- Exceptions
-
IndexOutOfBoundsException | when |
◆ setFileLocationIcon()
void com.foxit.uiextensions.controls.menu.IMenuView.setFileLocationIcon |
( |
int |
id | ) |
|
Change the file location icon in the menu title
- Parameters
-
id | The resource id of the icon to display in the title bar. |
◆ setNegativeTitle()
void com.foxit.uiextensions.controls.menu.IMenuView.setNegativeTitle |
( |
CharSequence |
text, |
|
|
View.OnClickListener |
onClickListener |
|
) |
| |
Set a listener to be invoked when the negative button of the title bar is pressed.
- Parameters
-
text | The resource id of the text to display in the negative button |
onClickListener | The View.OnClickListener to use. |
◆ setPositiveTitle()
void com.foxit.uiextensions.controls.menu.IMenuView.setPositiveTitle |
( |
CharSequence |
text, |
|
|
View.OnClickListener |
onClickListener |
|
) |
| |
Set a listener to be invoked when the positive button of the title bar is pressed.
- Parameters
-
◆ setTitle()
void com.foxit.uiextensions.controls.menu.IMenuView.setTitle |
( |
String |
text | ) |
|
Change the menu view title
- Parameters
-
text | The new text to be displayed. |
◆ setTitleBarVisible()
void com.foxit.uiextensions.controls.menu.IMenuView.setTitleBarVisible |
( |
boolean |
visible | ) |
|
Set whether to display the title bar
- Parameters
-
visible | true display the title bar |