mContext = context; mId = id; mGroup = group; mCategoryOrder = categoryOrder; mOrdering = ordering; mTitle = title;
return false;
return null;
return mShortcutAlphabeticChar;
return mGroup;
return mIconDrawable;
return mIntent;
return mId;
return mShortcutNumericChar;
return mOrdering;
return mTitle;
return mTitleCondensed != null ? mTitleCondensed : mTitle;
if (mClickListener != null && mClickListener.onMenuItemClick(this)) { return true; } if (mIntent != null) { mContext.startActivity(mIntent); return true; } return false;
return (mFlags & CHECKABLE) != 0;
return (mFlags & CHECKED) != 0;
return (mFlags & ENABLED) != 0;
return (mFlags & HIDDEN) == 0;
throw new UnsupportedOperationException();
mShortcutAlphabeticChar = alphaChar; return this;
mFlags = (mFlags & ~CHECKABLE) | (checkable ? CHECKABLE : 0); return this;
mFlags = (mFlags & ~CHECKED) | (checked ? CHECKED : 0); return this;
mFlags = (mFlags & ~ENABLED) | (enabled ? ENABLED : 0); return this;
mFlags = (mFlags & ~EXCLUSIVE) | (exclusive ? EXCLUSIVE : 0); return this;
mIconDrawable = icon; mIconResId = NO_ICON; return this;
mIconResId = iconRes; mIconDrawable = mContext.getDrawable(iconRes); return this;
mIntent = intent; return this;
mShortcutNumericChar = numericChar; return this;
// No need to save the listener; ActionMenuItem does not support collapsing items. return this;
mClickListener = menuItemClickListener; return this;
mShortcutNumericChar = numericChar; mShortcutAlphabeticChar = alphaChar; return this;
// Do nothing. ActionMenuItems always show as action buttons.
setShowAsAction(actionEnum); return this;
mTitle = title; return this;
mTitle = mContext.getResources().getString(title); return this;
mTitleCondensed = title; return this;
mFlags = (mFlags & HIDDEN) | (visible ? 0 : HIDDEN); return this;