public void clear() {
    if (mExpandedItem != null) {
      collapseItemActionView(mExpandedItem);
    }
    mItems.clear();

    onItemsChanged(true);
  }
  @Override
  public boolean collapseActionView() {
    if ((mShowAsAction & SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW) == 0) {
      return false;
    }
    if (mActionView == null) {
      // We're already collapsed if we have no action view.
      return true;
    }

    if (mOnActionExpandListener == null || mOnActionExpandListener.onMenuItemActionCollapse(this)) {
      return mMenu.collapseItemActionView(this);
    }

    return false;
  }