title: setOnItemClickListener in ListView affecting multiple rows
body: <p>I have a custom listview and a custom adapter.
  When clicking a row of this listview, the text of a TextView is set to white and the background of this row is set to black.</p>
  
  <p>All is well but when clicking a row, other rows are having a background color set to Black too and when scrolling up and down all will mess up.</p>
  
  <p><strong>getView() in custom adapter</strong></p>
  
  <pre><code>public View getView(final int position, View convertView, ViewGroup parent) {  
      final ListItem holder;
      View vi=convertView;
  
      if(vi==null){
          vi = inflater.inflate(R.layout.list, null);
          holder = new ListItem();
          holder.nametext= (TextView) vi.findViewById(R.id.name);
          vi.setTag(holder);
  
      }else{
          holder = (ListItem) vi.getTag();
      }
  
      holder.nametext.setText(""+item.name);
      return vi;
  }
  </code></pre>
  
  <p><strong>In mainactivity:</strong></p>
  
  <pre><code>CustomAdapter listadapter = new CustomAdapter(context, R.layout.list, items);
  list.setAdapter(listadapter);
  
      list.setOnItemClickListener(new OnItemClickListener() {
  
          @Override
          public void onItemClick(AdapterView&lt;?&gt; adapter, View view, int position, long arg){
                 TextView v = (TextView) view.findViewById(R.id.name);
                 view.setBackgroundColor(Color.BLACK);
                 v.setTextColor(Color.WHITE);
          }
  
      });
  </code></pre>
  
  <p>I tried puttin the setOnItemClickListener in the getView() but no luck either..</p>
  
  <p>Any help? thanks.</p>