public virtual bool onSubMenuSelected([email protected] subMenu) { if (subMenu.hasVisibleItems()) { [email protected] subPopup = new [email protected] (mContext, subMenu, mAnchorView, false); subPopup.setCallback(mPresenterCallback); bool preserveIconSpacing = false; int count = subMenu.size(); { for (int i = 0; i < count; i++) { android.view.MenuItem childItem = subMenu.getItem(i); if (childItem.isVisible() && childItem.getIcon() != null) { preserveIconSpacing = true; break; } } } subPopup.setForceShowIcon(preserveIconSpacing); if (subPopup.tryShow()) { if (mPresenterCallback != null) { mPresenterCallback.onOpenSubMenu(subMenu); } return(true); } } return(false); }
public ActionButtonSubmenu(ActionMenuPresenter _enclosing, android.content.Context context, [email protected] subMenu) : base(context, subMenu ) { this._enclosing = _enclosing; this.mSubMenu = subMenu; [email protected] item = ([email protected] )subMenu.getItem(); if (!item.isActionButton()) { // Give a reasonable anchor to nested submenus. this.setAnchorView(this._enclosing.mOverflowButton == null ? (android.view.View) this ._enclosing.mMenuView : this._enclosing.mOverflowButton); } this.setCallback(this._enclosing.mPopupPresenterCallback); bool preserveIconSpacing = false; int count = subMenu.size(); { for (int i = 0; i < count; i++) { android.view.MenuItem childItem = subMenu.getItem(i); if (childItem.isVisible() && childItem.getIcon() != null) { preserveIconSpacing = true; break; } } } this.setForceShowIcon(preserveIconSpacing); }
public override bool onSubMenuSelected([email protected] subMenu) { if (!subMenu.hasVisibleItems()) { return(false); } [email protected] topSubMenu = subMenu; while (topSubMenu.getParentMenu() != mMenu) { topSubMenu = ([email protected])topSubMenu.getParentMenu (); } android.view.View anchor = findViewForItem(topSubMenu.getItem()); if (anchor == null) { if (mOverflowButton == null) { return(false); } anchor = mOverflowButton; } mOpenSubMenuId = subMenu.getItem().getItemId(); mActionButtonPopup = new android.view.@internal.menu.ActionMenuPresenter.ActionButtonSubmenu (this, mContext, subMenu); mActionButtonPopup.setAnchorView(anchor); mActionButtonPopup.show(); base.onSubMenuSelected(subMenu); return(true); }
public virtual bool onSubMenuSelected([email protected] menu) { if (mCallback != null) { return(mCallback.onOpenSubMenu(menu)); } return(false); }
public virtual bool onSubMenuSelected([email protected] subMenu) { if (!subMenu.hasVisibleItems()) { return(false); } // The window manager will give us a token. new [email protected](subMenu).show(null); if (mCallback != null) { mCallback.onOpenSubMenu(subMenu); } return(true); }
public override void onRestoreInstanceState(android.os.Parcelable state) { [email protected] saved = ([email protected] .SavedState)state; if (saved.openSubMenuId > 0) { android.view.MenuItem item = mMenu.findItem(saved.openSubMenuId); if (item != null) { [email protected] subMenu = ([email protected] )item.getSubMenu(); onSubMenuSelected(subMenu); } } }
public virtual bool onSubMenuSelected([email protected] subMenu) { if (this.mCallback == null) { return(false); } if (!subMenu.hasVisibleItems()) { return(true); } new [email protected](this._enclosing.getThemedContext( ), subMenu).show(); return(true); }
public override bool onSubMenuSelected([email protected] subMenu) { if (!subMenu.hasVisibleItems()) { return(false); } // The window manager will give us a token. [email protected] helper = new [email protected] (subMenu); helper.setPresenterCallback(mSubMenuPresenterCallback); helper.show(null); mOpenSubMenu = helper; mOpenSubMenuId = subMenu.getItem().getItemId(); base.onSubMenuSelected(subMenu); return(true); }
internal void setSubMenu([email protected] subMenu) { mSubMenu = subMenu; subMenu.setHeaderTitle(getTitle()); }
/// <hide></hide> public virtual void onCloseSubMenu([email protected] menu ) { }
public virtual android.view.SubMenu addSubMenu(int group, int id, int categoryOrder , java.lang.CharSequence title) { [email protected] item = ([email protected] )addInternal(group, id, categoryOrder, title); [email protected] subMenu = new [email protected] (mContext, this, item); item.setSubMenu(subMenu); return subMenu; }
public virtual void onCloseSubMenu([email protected] menu ) { throw new System.NotImplementedException(); }
public virtual bool onSubMenuSelected([email protected] subMenu) { throw new System.NotImplementedException(); }