title: Select all checkboxes in RecyclerView
body: <p>How can I select all checkboxes in <code>recyclerView?</code></p>
  
  <p>I try to do it like this:</p>
  
  <p><strong>in Adapter:</strong></p>
  
  <pre><code>   public void selectAll(){
          Log.e("onClickSelectAll","yes");
          isSelectedAll=true;
          notifyDataSetChanged();
      }
  
  
  @Override
      public void onBindViewHolder(ViewHolder holder, int position) {
          PersonDTO item = dataSet.get(position);
          holder.tvName.setText(item.getName());
          if (!isSelectedAll) holder.cbSelect.setSelected(false);
          else holder.cbSelect.setSelected(true);}
  </code></pre>
  
  <p>In <code>layout</code> <code>Activity</code> I have a <code>button</code> with <code>onClickListener</code>:</p>
  
  <pre><code> private void onClickSelectAll(View view) {
  
          getSelectPersonsAdapter().selectAll();
      }
  </code></pre>