title: highlighting the selected item in the listview in android
body: <p>I am having 1 list view <code>contactslist</code>. I wrote the code for highlighting the selected item in the <code>ListView</code>. It is working. When I click on 1 item it is highlighting that item but the problem is if I click on other item it is highlighting that too. I want to highlight the selected item only. The previous selection will have to gone when I click on another item. </p>
  
  <pre><code>arg1.setBackgroundResource(R.drawable.highlighter);
  </code></pre>
  
  <p>This is the code in the click listener using to highlight the selected item. plz help me.</p>
  
  <p><strong>Update</strong><br />
  I'm setting the background of the rows in the adapter:</p>
  
  <pre><code>public int[] colors = new int[]{0xFFedf5ff, 0xFFFFFFFF}; 
  public int colorPos; 
  
  [...]
  colorPos = position % colors.length; 
  row.setBackgroundColor(colors[colorPos]);
  </code></pre>