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; }
public virtual bool onOpenSubMenu([email protected] subMenu ) { if (subMenu == null) { return false; } if (!subMenu.hasVisibleItems()) { return true; } // Current menu will be dismissed by the normal helper, submenu will be shown in its place. new [email protected](mContext, subMenu, mAnchor).show( ); return true; }
public virtual bool onPreparePanel(int featureId, android.view.View view, android.view.Menu menu) { if (featureId == android.view.Window.FEATURE_OPTIONS_PANEL && menu != null) { bool goforit = onPrepareOptionsMenu(menu); goforit |= mFragments.dispatchPrepareOptionsMenu(menu); return goforit && menu.hasVisibleItems(); } return true; }
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 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 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; }