deselect list view item?
<p>I have list view with names and numbers and checkbox populated from contacts with SimpleAdapter, and on item click I listen event and change color of item, also I want to change checkbox to enabled and after user click one more time on the same item I want to deselect that item.
How can I do that?
Thanks Wolf.</p>

<p>This is my code, I can successfully change color, but I don't now how to change checkbox state for that specific item and than on second click to change that state again:</p>

<pre><code>lImenik.setOnItemClickListener(new OnItemClickListener() {

    public void onItemClick(AdapterView&lt;?&gt; adapter, View view, int position, long id) {
         // TODO Auto-generated method stub
         Object obj = lImenik.getItemAtPosition(position);
         String tmp = obj.toString();
         view.setBackgroundColor(Color.GRAY);

         for(int i = 0; i &lt; adapter.getChildCount(); i++){
         if(i == position){
         if(position != prePos){

             adapter.getChildAt(i).setBackgroundColor(Color.GRAY);                              
             prePos = position;                             
          } else {
             adapter.getChildAt(i).setBackgroundColor(0x191919);
             prePos = -1;
          }                         
        }                       
      }                 
     }
  });
}
</code></pre>
