title: Android filterable recyclerview with checkboxes
body: <p>I am developing an app in which i have <code>RecyclerView</code> with checkboxes and a searchview.For searching from edit text i have added </p>
  
  <p><a href="https://i.stack.imgur.com/jKmCu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jKmCu.png" alt="enter image description here"></a></p>
  
  <pre><code>search.addTextChangedListener(new TextWatcher() {
              @Override
              public void beforeTextChanged(CharSequence s, int start, int count, int after) {
  
              }
  
              @Override
              public void onTextChanged(CharSequence s, int start, int before, int count) {
  
              }
  
              @Override
              public void afterTextChanged(Editable s) {
  
              }
          });
  </code></pre>
  
  <p>and in <code>afterTextChanged()</code> i am changing list and calling <code>notifydatasetChanged()</code></p>
  
  <p>but state of checkboxes are lost after search.is there any way to keep checkboxes state?</p>