title: Android: Multiple gridView rows responding to item click
body: <p>Im trying to change (onClick) the background of an ImageView inside my GridView, but whem i click it, the selected row and another random one react to the click. Below is my code:</p>
  
  <pre><code>@Override
  public View getView(int position, View convertView, ViewGroup parent) {
      final ViewHolder holder;
      final int index = position;
  
      if (convertView == null) {
          convertView = inflater.inflate(R.layout.item_grid_galeria_modelo, parent, false);
  
          holder = new ViewHolder();
          holder.imageView = (ImageView) convertView.findViewById(R.id.image);
          holder.favoriteStar = (ImageView) convertView.findViewById(R.id.img_fav_star);
  
          convertView.setTag(holder);
      } else {
          holder = (ViewHolder) convertView.getTag();
      }
      holder.favoriteStar.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
              if (!holder.isFavorited) {
                  holder.isFavorited = true;
                  holder.favoriteStar.setImageResource(R.drawable.ic_star);
              } else { 
                  holder.isFavorited = false;
                  holder.favoriteStar.setImageResource(R.drawable.ic_star_grey);
              }
          }
      });
  </code></pre>
  
  <p>Any help is appreciated. Thanks! :]</p>