title: ListView item won't stay "selected"
body: <p>I want to change the background of a listview item when the user clicks it. Kind of like the <a href="http://www.intomobile.com/wp-content/uploads/2011/02/xoom-honeycomb-settings-11.png" rel="nofollow">Honeycomb settings page</a> (Although I'm not dealing with just settings so I'm not using PreferenceActivity)  I have this functionality working through a resource state selector state selector except for the cases when clicking on the listview menu changes the linear layout to the  right of the listview (sort of a split screen view). I'm guessing the listview looses focus so state_pressed is no longer true.</p>
  
  <pre><code>   &lt;item android:state_pressed="true"&gt;
       &lt;shape  &gt;
          &lt;solid android:color="@color/blue1" /&gt;
       &lt;/shape&gt;
     &lt;/item&gt;
  </code></pre>
  
  <p>Any tips to keep that listview item colored until another listview item is selected? Thanks!</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>I was able to get the background changed in a setOnItemClickListener with </p>
  
  <pre><code>view.setBackgroundResource(R.color.red); 
  </code></pre>
  
  <p>I only need one selected at a time so when the other list items are clicked, I tried <code>lv.invalidate()</code> and <code>lv.getChildAt(0).invalidate()</code> but neither worked and the second causes null pointer exception. Any ideas for putting the color back?</p>