|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.actionbarsherlock.internal.view.menu.BaseMenuPresenter
com.actionbarsherlock.internal.view.menu.ActionMenuPresenter
public class ActionMenuPresenter
MenuPresenter for building action menus as seen in the action bar and action modes.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.actionbarsherlock.internal.view.menu.MenuPresenter |
|---|
MenuPresenter.Callback |
| Field Summary |
|---|
| Fields inherited from class com.actionbarsherlock.internal.view.menu.BaseMenuPresenter |
|---|
mContext, mInflater, mMenu, mMenuView, mSystemContext, mSystemInflater |
| Constructor Summary | |
|---|---|
ActionMenuPresenter(android.content.Context context)
|
|
| Method Summary | |
|---|---|
void |
bindItemView(MenuItemImpl item,
MenuView.ItemView itemView)
Bind item data to an existing item view. |
boolean |
dismissPopupMenus()
Dismiss all popup menus - overflow and submenus. |
boolean |
filterLeftoverView(android.view.ViewGroup parent,
int childIndex)
Filter the child view at index and remove it if appropriate. |
boolean |
flagActionItems()
Called by Menu implementations to flag items that will be shown as actions. |
android.view.View |
getItemView(MenuItemImpl item,
android.view.View convertView,
android.view.ViewGroup parent)
Prepare an item view for use. |
MenuView |
getMenuView(android.view.ViewGroup root)
Retrieve a MenuView to display the menu specified in #initForMenu(Context, Menu). |
boolean |
hideOverflowMenu()
Hide the overflow menu if it is currently showing. |
boolean |
hideSubMenus()
Dismiss all submenu popups. |
void |
initForMenu(android.content.Context context,
MenuBuilder menu)
Initialize this presenter for the given context and menu. |
boolean |
isOverflowMenuShowing()
|
boolean |
isOverflowReserved()
|
void |
onCloseMenu(MenuBuilder menu,
boolean allMenusAreClosing)
Called by Menu implementations to indicate that a menu or submenu is closing. |
void |
onConfigurationChanged(android.content.res.Configuration newConfig)
|
void |
onRestoreInstanceState(android.os.Parcelable state)
Supplies the previously saved instance state to be restored. |
android.os.Parcelable |
onSaveInstanceState()
Returns a Parcelable describing the current state of the presenter. |
boolean |
onSubMenuSelected(SubMenuBuilder subMenu)
Called by Menu implementations to indicate that a submenu item has been selected. |
void |
onSubUiVisibilityChanged(boolean isVisible)
|
static boolean |
reserveOverflow(android.content.Context context)
|
void |
setExpandedActionViewsExclusive(boolean isExclusive)
|
void |
setItemLimit(int itemCount)
|
void |
setReserveOverflow(boolean reserveOverflow)
|
void |
setWidthLimit(int width,
boolean strict)
|
boolean |
shouldIncludeItem(int childIndex,
MenuItemImpl item)
Filter item by child index and item data. |
boolean |
showOverflowMenu()
Display the overflow menu if one is present. |
void |
updateMenuView(boolean cleared)
Reuses item views when it can |
| Methods inherited from class com.actionbarsherlock.internal.view.menu.BaseMenuPresenter |
|---|
addItemView, collapseItemActionView, createItemView, expandItemActionView, getId, setCallback, setId |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ActionMenuPresenter(android.content.Context context)
| Method Detail |
|---|
public void initForMenu(android.content.Context context,
MenuBuilder menu)
MenuPresenterMenuBuilder.addMenuPresenter(MenuPresenter)
initForMenu in interface MenuPresenterinitForMenu in class BaseMenuPresentercontext - Context for this presenter; used for view creation and resource managementmenu - Menu to hostpublic static boolean reserveOverflow(android.content.Context context)
public void onConfigurationChanged(android.content.res.Configuration newConfig)
public void setWidthLimit(int width,
boolean strict)
public void setReserveOverflow(boolean reserveOverflow)
public void setItemLimit(int itemCount)
public void setExpandedActionViewsExclusive(boolean isExclusive)
public MenuView getMenuView(android.view.ViewGroup root)
MenuPresenter#initForMenu(Context, Menu).
getMenuView in interface MenuPresentergetMenuView in class BaseMenuPresenterroot - Intended parent of the MenuView.
public android.view.View getItemView(MenuItemImpl item,
android.view.View convertView,
android.view.ViewGroup parent)
BaseMenuPresenter
getItemView in class BaseMenuPresenteritem - Item to presentconvertView - Existing view to reuseparent - Intended parent view - use for inflation.
public void bindItemView(MenuItemImpl item,
MenuView.ItemView itemView)
BaseMenuPresenter
bindItemView in class BaseMenuPresenteritem - Item to binditemView - View to populate with item data
public boolean shouldIncludeItem(int childIndex,
MenuItemImpl item)
BaseMenuPresenter
shouldIncludeItem in class BaseMenuPresenterchildIndex - Indended presentation index of this itemitem - Item to present
public void updateMenuView(boolean cleared)
BaseMenuPresenter
updateMenuView in interface MenuPresenterupdateMenuView in class BaseMenuPresentercleared - true if the menu was entirely cleared
public boolean filterLeftoverView(android.view.ViewGroup parent,
int childIndex)
BaseMenuPresenter
filterLeftoverView in class BaseMenuPresenterparent - Parent to filter fromchildIndex - Index to filter
public boolean onSubMenuSelected(SubMenuBuilder subMenu)
MenuPresenter
onSubMenuSelected in interface MenuPresenteronSubMenuSelected in class BaseMenuPresentersubMenu - SubMenu being opened
public boolean showOverflowMenu()
public boolean hideOverflowMenu()
public boolean dismissPopupMenus()
public boolean hideSubMenus()
public boolean isOverflowMenuShowing()
public boolean isOverflowReserved()
public boolean flagActionItems()
MenuPresenter
flagActionItems in interface MenuPresenterflagActionItems in class BaseMenuPresenter
public void onCloseMenu(MenuBuilder menu,
boolean allMenusAreClosing)
MenuPresenter
onCloseMenu in interface MenuPresenteronCloseMenu in class BaseMenuPresentermenu - Menu or submenu that is closing.allMenusAreClosing - True if all associated menus are closing.public android.os.Parcelable onSaveInstanceState()
MenuPresenterMenuPresenter.onRestoreInstanceState(Parcelable)
method of the presenter sharing the same ID later.
onSaveInstanceState in interface MenuPresenterpublic void onRestoreInstanceState(android.os.Parcelable state)
MenuPresenter
onRestoreInstanceState in interface MenuPresenterstate - The previously saved instance statepublic void onSubUiVisibilityChanged(boolean isVisible)
onSubUiVisibilityChanged in interface ActionProvider.SubUiVisibilityListener
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||