code: public <T extends IItem & IExpandable> void selectRange(int from, int to, boolean select, boolean skipHeaders) {
          if (from > to) {
              int temp = from;
              from = to;
              to = temp;
          }
  
          IItem item;
          for (int i = from; i <= to; i++) {
              item = mFastAdapter.getAdapterItem(i);
              if (item.isSelectable()) {
                  if (select) {
                      mFastAdapter.select(i);
                  } else {
                      mFastAdapter.deselect(i);
                  }
              }
              if (mSupportSubItems && !skipHeaders) {
                  // if a group is collapsed, select all sub items
                  if (item instanceof IExpandable && !((IExpandable)item).isExpanded()) {
                      SubItemUtil.selectAllSubItems(mFastAdapter, (T) mFastAdapter.getAdapterItem(i), select, true, mPayload);
                  }
              }
          }
  
          if (mActionModeHelper != null) {
              mActionModeHelper.checkActionMode(null); // works with null as well, as the ActionMode is active for sure!
          }
      }
docs: selects all items in a range, from and to indizes are inclusive
  
  @param from the from index
  @param to the to index
  @param select true, if the provided range should be selected, false otherwise
  @param skipHeaders true, if you do not want to process headers, false otherwise