title: Random images getting color changes in listview
body: <p>My activity is a <strong>listView</strong>, which I am inflating using <strong>MyAdapter</strong> which extends <strong>BaseAdapter</strong>. My list view shows multiple images and I want to add a color filter effect,i.e. a change in color, to the images which have been already clicked.</p>
  
  <p>At first all the images are shown as they are, but when user clicks on an image then its color changes, which kinda has a less brightened effect on the image,so user can know they have already seen this image before. I am achieving this by using <code>setColorFilter</code> methods.
  And the image are changing after being clicked just fine.</p>
  
  <p>My problem is, as I scroll down the listView several images which have not been clicked before are also showing this effect. Whereas i want this effect to show only on the clicked images.</p>
  
  <p><strong>My code:-</strong></p>
  
  <pre><code>public class MyAdapter extends BaseAdapter {
           public class ViewHolder{
  
                  ImageView image;
  
              }
  
              @Override
              public View getView( final int arg0, View arg1, ViewGroup arg2) 
              {
                  View vi = arg1;
                  final ViewHolder holder;
                  final int type = getItemViewType(arg0);
  
                  if(arg1==null)
                  {
                      holder = new ViewHolder();
  
                      switch(type)
                      {
                      case 0:
  
                      LayoutInflater inflater = (LayoutInflater) itemlist.this.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
                      vi = inflater.inflate(R.layout.items, arg2,false);
  
  
                      holder.image = (ImageView)vi.findViewById(R.id.list_image);
                      holder.image.getLayoutParams().height=(int) (height/dpi); 
  
                      break;
  
  
  
                      }
                      vi.setTag(holder);
                  }
                  else{
                      holder=(ViewHolder)vi.getTag();
                  }
  
  Picasso.with(getApplicationContext())
                         .load(data.get(arg0).get(3))
                         .fit().centerCrop().into(holder.image);
  
   holder.image.setOnClickListener(new OnClickListener(){
  
                      @Override
                      public void onClick(View v)
                      {
                          // TODO Auto-generated method stub
                          holder.image.setColorFilter(0x70C6C6C6, PorterDuff.Mode.MULTIPLY);
                          Toast.makeText(getApplicationContext(), "Item"+arg0+" selected", Toast.LENGTH_SHORT).show();
                      }});
  }
              return vi;
  
  }
  </code></pre>
  
  <p>What am I doing wrong? </p>
  
  <p>Thanks.</p>