public virtual void initForMenu(android.content.Context context, [email protected] menu) { mContext = context; mInflater = android.view.LayoutInflater.from(mContext); mMenu = menu; }
/// <summary>Construct a new PopupMenu.</summary> /// <remarks>Construct a new PopupMenu.</remarks> /// <param name="context">Context for the PopupMenu.</param> /// <param name="anchor"> /// Anchor view for this popup. The popup will appear below the anchor if there /// is room, or above it if there is not. /// </param> public PopupMenu(android.content.Context context, android.view.View anchor) { // TODO Theme? mContext = context; mMenu = new [email protected](context); mMenu.setCallback(this); mAnchor = anchor; mPopup = new [email protected](context, mMenu, anchor); mPopup.setCallback(this); }
public MenuPopupHelper(android.content.Context context, [email protected] menu, android.view.View anchorView, bool overflowOnly) { mContext = context; mInflater = android.view.LayoutInflater.from(context); mMenu = menu; mOverflowOnly = overflowOnly; android.content.res.Resources res = context.getResources(); mPopupMaxWidth = System.Math.Max(res.getDisplayMetrics().widthPixels / 2, res.getDimensionPixelSize ([email protected]_prefDialogWidth)); mAnchorView = anchorView; menu.addMenuPresenter(this); }
public virtual void initForMenu(android.content.Context context, [email protected] menu) { if (mThemeRes != 0) { mContext = new android.view.ContextThemeWrapper(context, mThemeRes); mInflater = android.view.LayoutInflater.from(mContext); } else { if (mContext != null) { mContext = context; if (mInflater == null) { mInflater = android.view.LayoutInflater.from(mContext); } } } mMenu = menu; }
public MenuDialogHelper([email protected] menu) { mMenu = menu; }
/// <summary>Instantiates this menu item.</summary> /// <remarks>Instantiates this menu item.</remarks> /// <param name="menu"></param> /// <param name="group"> /// Item ordering grouping control. The item will be added after /// all other items whose order is <= this number, and before any /// that are larger than it. This can also be used to define /// groups of items for batch state changes. Normally use 0. /// </param> /// <param name="id">Unique item ID. Use 0 if you do not need a unique ID.</param> /// <param name="categoryOrder">The ordering for this item.</param> /// <param name="title">The text to display for the item.</param> internal MenuItemImpl([email protected] menu, int group, int id, int categoryOrder, int ordering, java.lang.CharSequence title, int showAsAction ) { if (sPrependShortcutLabel == null) { // This is instantiated from the UI thread, so no chance of sync issues sPrependShortcutLabel = menu.getContext().getResources().getString([email protected] [email protected]_shortcut_label); sEnterShortcutLabel = menu.getContext().getResources().getString([email protected] [email protected]_enter_shortcut_label); sDeleteShortcutLabel = menu.getContext().getResources().getString([email protected] [email protected]_delete_shortcut_label); sSpaceShortcutLabel = menu.getContext().getResources().getString([email protected] [email protected]_space_shortcut_label); } mMenu = menu; mId = id; mGroup = group; mCategoryOrder = categoryOrder; mOrdering = ordering; mTitle = title; mShowAsAction = showAsAction; }
public void initialize([email protected] menu) { mMenu = menu; }
public MenuAdapter(MenuPopupHelper _enclosing, [email protected] menu) { this._enclosing = _enclosing; mExpandedIndex = -1; this.mAdapterMenu = menu; this.registerDataSetObserver(new [email protected]r (this._enclosing)); this.findExpandedIndex(); }
public SubMenuBuilder(android.content.Context context, [email protected] parentMenu, [email protected] item) : base(context) { mParentMenu = parentMenu; mItem = item; }
public ActionModeImpl(ActionBarImpl _enclosing, android.view.ActionMode.Callback callback) { this._enclosing = _enclosing; this.mCallback = callback; this.mMenu = new [email protected](this._enclosing.getThemedContext ()).setDefaultShowAsAction(android.view.MenuItemClass.SHOW_AS_ACTION_IF_ROOM); this.mMenu.setCallback(this); }