@Override
 public boolean onLongClick(final View view) {
   if (mActionMode == null) {
     mActionMode = mActivity.startSupportActionMode(this);
   }
   toggleViewActivatedState(view);
   return true;
 }
 public void addViewToActionMode(final View view) {
   if (mActionMode == null) {
     mActionMode = mActivity.startSupportActionMode(this);
   }
   final int position = mRecyclerView.getChildPosition(view);
   if (!mActivatedPositions.contains(position)) {
     toggleViewActivatedState(view);
   }
 }
  public void restoreInstanceState(final Bundle bundle) {
    if (bundle == null) {
      return;
    }
    final List<Integer> items = bundle.getIntegerArrayList(ACTIVATED_POSITIONS);
    if (Utils.isCollectionEmpty(items)) {
      return;
    }

    mActivatedPositions.addAll(items);
    mActionMode = mActivity.startSupportActionMode(this);
    notifyActivatedItemsChanged();
  }