public MenuItem setActionView(View view) {
   mActionView = view;
   mActionProvider = null;
   if (view != null && view.getId() == View.NO_ID && mId > 0) {
     view.setId(mId);
   }
   mMenu.onItemActionRequestChanged(this);
   return this;
 }
  public void setShowAsAction(int actionEnum) {
    switch (actionEnum & SHOW_AS_ACTION_MASK) {
      case SHOW_AS_ACTION_ALWAYS:
      case SHOW_AS_ACTION_IF_ROOM:
      case SHOW_AS_ACTION_NEVER:
        // Looks good!
        break;

      default:
        // Mutually exclusive options selected!
        throw new IllegalArgumentException(
            "SHOW_AS_ACTION_ALWAYS, SHOW_AS_ACTION_IF_ROOM,"
                + " and SHOW_AS_ACTION_NEVER are mutually exclusive.");
    }
    mShowAsAction = actionEnum;
    mMenu.onItemActionRequestChanged(this);
  }
 public void actionFormatChanged() {
   mMenu.onItemActionRequestChanged(this);
 }