public class AppMenuHandler
extends java.lang.Object
| 构造器和说明 |
|---|
AppMenuHandler(Activity activity,
AppMenuPropertiesDelegate delegate,
int menuResourceId)
Constructs an AppMenuHandler object.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addObserver(AppMenuObserver observer)
Adds the observer to App Menu.
|
AppMenu |
getAppMenu() |
boolean |
isAppMenuShowing() |
void |
menuItemContentChanged(int menuRowId)
Notifies the menu that the contents of the menu item specified by
menuRowId have
changed. |
void |
removeObserver(AppMenuObserver observer)
Removes the observer from the App Menu.
|
void |
setMenuHighlight(java.lang.Integer highlightItemId)
Calls attention to this menu and a particular item in it.
|
public AppMenuHandler(Activity activity,
AppMenuPropertiesDelegate delegate,
int menuResourceId)
activity - Activity that is using the AppMenu.delegate - Delegate used to check the desired AppMenu properties on show.menuResourceId - Resource Id that should be used as the source for the menu items.
It is assumed to have back_menu_id, forward_menu_id, bookmark_this_page_id.public void menuItemContentChanged(int menuRowId)
menuRowId have
changed. This should be called if icons, titles, etc. are changing for a particular menu
item while the menu is open.menuRowId - The id of the menu item to change. This must be a row id and not a child
id.public void setMenuHighlight(java.lang.Integer highlightItemId)
highlightItemId - The id of a menu item to highlight or null to turn off the
highlight.public boolean isAppMenuShowing()
public AppMenu getAppMenu()
public void addObserver(AppMenuObserver observer)
observer - Observer that should be notified about App Menu changes.public void removeObserver(AppMenuObserver observer)
observer - Observer that should no longer be notified about App Menu changes.