title: Set the state of an item in a RecyclerView selected when click on it
body: <p>I think this will be very easy to implement but after hours of searching I could not find something useful to get it working.
  I want to set selected the item that the user clicks in a Drawer, this list is an RecyclerView. In the ViewHolder of my adapter I have an onClick event for the items:</p>
  
  <pre><code>@Override
  public void onClick(View v) {
     notifyItemChanged(selectedItem);
     selectedItem = getPosition();
     notifyItemChanged(selectedItem);
  }
  </code></pre>
  
  <p>selectedItem is an int to track the selected item.</p>
  
  <p>Now in the onBindViewHolder I do this:</p>
  
  <pre><code>holder.itemView.setSelected(position == selectedItem);
  </code></pre>
  
  <p>But it seems that the selected state is never called because I have a android:background seted to the items row with this content:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;selector xmlns:android="http://schemas.android.com/apk/res/android"&gt;
      &lt;item
          android:state_selected="true"
          android:drawable="@drawable/border_bottom_selected"
          android:color="@color/backgroundToolbar"/&gt;
      &lt;item android:drawable="@drawable/border_bottom" /&gt;
  &lt;/selector&gt;
  </code></pre>
  
  <p>The normal state is working so I know that the background is well applied.</p>
  
  <p>So, how can I set the selected state to an item in a RecyclerView?</p>