code: @Override
      public View onCreateActionView() {
          // Create the view and set its data model.
          ActivityChooserModel dataModel = ActivityChooserModel.get(mContext, mShareHistoryFileName);
          ActivityChooserView activityChooserView = new ActivityChooserView(mContext);
          activityChooserView.setActivityChooserModel(dataModel);
  
          // Lookup and set the expand action icon.
          TypedValue outTypedValue = new TypedValue();
          mContext.getTheme().resolveAttribute(R.attr.actionModeShareDrawable, outTypedValue, true);
          Drawable drawable = mContext.getResources().getDrawable(outTypedValue.resourceId);
          activityChooserView.setExpandActivityOverflowButtonDrawable(drawable);
          activityChooserView.setProvider(this);
  
          // Set content description.
          activityChooserView.setDefaultActionButtonContentDescription(
                  R.string.abc_shareactionprovider_share_with_application);
          activityChooserView.setExpandActivityOverflowButtonContentDescription(
                  R.string.abc_shareactionprovider_share_with);
  
          return activityChooserView;
      }
docs: {@inheritDoc}