Foxit PDF SDK  9.1
com.foxit.uiextensions.controls.menu.IMenuView Interface Reference

Classes

interface  OnClosedListener
 

Public Member Functions

void close ()
 
void addClosedListener (OnClosedListener closedListener)
 
IMenuGroup addGroup (CharSequence title)
 
IMenuGroup addGroup (int groupId, CharSequence title)
 
IMenuGroup addGroupAt (int index, CharSequence title)
 
IMenuGroup addGroupAt (int index, int groupId, CharSequence title)
 
void removeGroup (int groupId)
 
void removeGroupAt (int index)
 
void removeGroup (IMenuGroup group)
 
IMenuGroup getGroup (int groupId)
 
IMenuGroup getGroupAt (int index)
 
List< IMenuGroupgetGroups ()
 
View getContentView ()
 
void setTitle (String text)
 
void setTitleBarVisible (boolean visible)
 
void setPositiveTitle (CharSequence text, View.OnClickListener onClickListener)
 
void setNegativeTitle (CharSequence text, View.OnClickListener onClickListener)
 
void setFileLocationIcon (int id)
 

Detailed Description

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()

Member Function Documentation

◆ addClosedListener()

void com.foxit.uiextensions.controls.menu.IMenuView.addClosedListener ( OnClosedListener  closedListener)

Add a listener to be invoked when the menu view is closed.

Parameters
closedListenerThe IMenuView.OnClosedListener to use.

◆ 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
titlethe 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
groupIdUnique 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
titlethe group title string.
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
indexthe position at which to add the group item
titlethe group title string.
Returns
The newly added menu group.
Exceptions
IndexOutOfBoundsExceptionwhen
index < 0 || >= size()

◆ 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
indexthe position at which to add the group item
groupIdUnique 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
titlethe group title string.
Returns
The newly added menu group.
Exceptions
IndexOutOfBoundsExceptionwhen
index < 0 || >= size()

◆ close()

void com.foxit.uiextensions.controls.menu.IMenuView.close ( )

Close the menu view

◆ 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
groupIdUnique 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
Returns
The group item.

◆ getGroupAt()

IMenuGroup com.foxit.uiextensions.controls.menu.IMenuView.getGroupAt ( int  index)

Gets the group item at the given index.

Parameters
indexThe index of the group item to return.
Returns
The group item.
Exceptions
IndexOutOfBoundsExceptionwhen
index < 0 || >= size()

◆ 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
groupThe 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
groupIdThe 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
indexthe position in the group of the menu to remove
Exceptions
IndexOutOfBoundsExceptionwhen
index < 0 || >= size()

◆ setFileLocationIcon()

void com.foxit.uiextensions.controls.menu.IMenuView.setFileLocationIcon ( int  id)

Change the file location icon in the menu title

Parameters
idThe 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
textThe resource id of the text to display in the negative button
onClickListenerThe 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
textThe text to display in the positive button
onClickListenerThe View.OnClickListener to use.

◆ setTitle()

void com.foxit.uiextensions.controls.menu.IMenuView.setTitle ( String  text)

Change the menu view title

Parameters
textThe new text to be displayed.

◆ setTitleBarVisible()

void com.foxit.uiextensions.controls.menu.IMenuView.setTitleBarVisible ( boolean  visible)

Set whether to display the title bar

Parameters
visibletrue display the title bar