mContext = context; mContextView = view; mCallback = callback; mMenu = new MenuBuilder(context).setDefaultShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM); mMenu.setCallback(this); mFocusable = isFocusable;
if (mFinished) { return; } mFinished = true; mContextView.sendAccessibilityEvent(AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED); mCallback.onDestroyActionMode(this);
return mCustomView != null ? mCustomView.get() : null;
return mMenu;
return new MenuInflater(mContext);
return mContextView.getSubtitle();
return mContextView.getTitle();
mCallback.onPrepareActionMode(this, mMenu);
return mContextView.isTitleOptional();
return mFocusable;
return mCallback.onActionItemClicked(this, item);
invalidate(); mContextView.showOverflowMenu();
if (!subMenu.hasVisibleItems()) { return true; } new MenuPopupHelper(mContext, subMenu).show(); return true;
mContextView.setCustomView(view); mCustomView = view != null ? new WeakReference<View>(view) : null;
mContextView.setSubtitle(subtitle);
setSubtitle(mContext.getString(resId));
mContextView.setTitle(title);
setTitle(mContext.getString(resId));
super.setTitleOptionalHint(titleOptional); mContextView.setTitleOptional(titleOptional);