Code example for MenuItem

Methods: getActionView, setEnabled

0
	@Override 
	public View getActionView() {
		if (Build.VERSION.SDK_INT < 11) {
			return compatActionView;
		} else { 
			return menuItem.getActionView();
		} 
	} 
 
	@Override 
	public char getAlphabeticShortcut() { 
		return menuItem.getAlphabeticShortcut();
	} 
 
	@Override 
	public int getGroupId() { 
		return menuItem.getGroupId();
	} 
 
	@Override 
	public Drawable getIcon() {
		return menuItem.getIcon();
	} 
 
	@Override 
	public Intent getIntent() {
		return menuItem.getIntent();
	} 
 
	@Override 
	public int getItemId() { 
		return menuItem.getItemId();
	} 
 
	@Override 
	public ContextMenuInfo getMenuInfo() {
		return menuItem.getMenuInfo();
	} 
 
	@Override 
	public char getNumericShortcut() { 
		return menuItem.getNumericShortcut();
	} 
 
	@Override 
	public int getOrder() { 
		return menuItem.getOrder();
	} 
 
	@Override 
	public SubMenu getSubMenu() {
		return menuItem.getSubMenu();
	} 
 
	@Override 
	public CharSequence getTitle() {
		return menuItem.getTitle();
	} 
 
	@Override 
	public CharSequence getTitleCondensed() {
		return menuItem.getTitleCondensed();
	} 
 
	@Override 
	public boolean hasSubMenu() { 
		return menuItem.hasSubMenu();
	} 
 
	@Override 
	public boolean isActionViewExpanded() { 
		if (Build.VERSION.SDK_INT >= 11) {
			return menuItem.isActionViewExpanded();
		} else { 
			return false; 
		} 
	} 
 
	@Override 
	public boolean isCheckable() { 
		return menuItem.isCheckable();
	} 
 
	@Override 
	public boolean isChecked() { 
		return menuItem.isChecked();
	} 
 
	@Override 
	public boolean isEnabled() { 
		return menuItem.isEnabled();
	} 
 
	@Override 
	public boolean isVisible() { 
		return menuItem.isVisible();
	} 
 
	@Override 
	public MenuItem setActionProvider(ActionProvider actionProvider) {
		if (Build.VERSION.SDK_INT >= 11) {
			return menuItem.setActionProvider(actionProvider);
		} else { 
			return menuItem;
		} 
	} 
 
	@Override 
	public MenuItem setActionView(View view) {
		if (Build.VERSION.SDK_INT < 11) {
			compatActionView = view;
			setVisible(isVisible()); 
			setEnabled(isEnabled()); 
			return menuItem;
		} else { 
			return menuItem.setActionView(view);
		} 
	} 
 
	@Override 
	public MenuItem setActionView(int resId) {
		if (Build.VERSION.SDK_INT >= 11) {
			return menuItem.setActionView(resId);
		} else { 
			return menuItem;
		} 
	} 
 
	@Override 
	public MenuItem setAlphabeticShortcut(char alphaChar) {
		return menuItem.setAlphabeticShortcut(alphaChar);
	} 
 
	@Override 
	public MenuItem setCheckable(boolean checkable) {
		return menuItem.setCheckable(checkable);
	} 
 
	@Override 
	public MenuItem setChecked(boolean checked) {
		return menuItem.setChecked(checked);
	} 
 
	@Override 
	public MenuItem setEnabled(boolean enabled) {
		if (getActionView() != null) { 
			getActionView().setEnabled(enabled);
		} 
		return menuItem.setEnabled(enabled);
	} 
 
	@Override 
	public MenuItem setIcon(Drawable icon) {
		if (getActionView() != null && (getActionView() instanceof ImageButton)) {