title: Listview - losing selected items after scroll down
body: <p>I'm changing the background when some item is selected in my listview, but every time that I scroll down, I'm losing the selected items</p>
  
  <p><strong>selector.xml</strong></p>
  
  <pre><code>&lt;selector xmlns:android="http://schemas.android.com/apk/res/android"&gt;
     &lt;item android:drawable="@android:color/darker_gray" android:state_selected="true"/&gt;
  &lt;/selector&gt;
  </code></pre>
  
  <p><strong>adapter</strong></p>
  
  <pre><code>holder.cardView.setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View v) {
      boolean selected = v.isSelected();
      v.setSelected(!selected);
    }
  });
  </code></pre>
  
  <p>How I can keep the background state?</p>