title: List items linked android
body: <p>Pretty much I have a listview, where if you press one button, the other is meant to change to a dark grey image. The code works fine on an individual level, but for some reason the action is replicated every 4th list item. Here is the getItemView code! (By the way I have indeed tried making the imagebuttons local!)</p>
  
  <pre><code>ImageButton thumbsUpButton;
  ImageButton thumbsDownButton;
  @Override
  public View getItemView(FactListParseObject factRow, View v,
          ViewGroup parent) {
  
      if (v == null) {
          v = View.inflate(getContext(), R.layout.fact_list_row, null);
      }
  
      super.getItemView(factRow, v, parent);
  
      setTexts(v, factRow);
  
      thumbsUpButton = (ImageButton) v.findViewById(R.id.thumbsup);
      thumbsDownButton = (ImageButton) v.findViewById(R.id.thumbsdown);
  
      if (thumbsDownButton != null&amp;&amp; thumbsUpButton!=null) {
      thumbsUpButton.setTag(false);
      thumbsDownButton.setTag(false);
  
      thumbsUpButton.setOnClickListener(new OnClickListener() {
  
          @Override
          public void onClick(View v) {
              if((boolean)thumbsUpButton.getTag()==true){
  
                  thumbsUpButton
                          .setImageResource(R.drawable.thumbsup);
                  thumbsUpButton.setTag(false);
              }
              if ((boolean)thumbsDownButton.getTag() == false) {
                  // thumbsdown not currently disabled
                  thumbsDownButton
                          .setImageResource(R.drawable.thumbsdowndisabled);
                  thumbsDownButton.setTag(true);
  
  
              } else {
                  // thumbsdown is disabled
                  thumbsDownButton.setImageResource(R.drawable.thumbsdown);
                  thumbsDownButton.setTag(false);
  
              }
          }
      });
      thumbsDownButton.setOnClickListener(new OnClickListener() {
  
          @Override
          public void onClick(View v) {
              Log.d("called","howmany");
              if((boolean)thumbsDownButton.getTag()==true){
  
                  thumbsDownButton
                          .setImageResource(R.drawable.thumbsdown);
                  thumbsDownButton.setTag(false);
              }
              if ((boolean)thumbsUpButton.getTag() == false) {
                  // thumbsdown not currently disabled
                  thumbsUpButton
                          .setImageResource(R.drawable.thumbsupdisabled);
                  thumbsUpButton.setTag(true);
  
  
              } else {
                  // thumbsdown is disabled
                  thumbsUpButton.setImageResource(R.drawable.thumbsup);
                  thumbsUpButton.setTag(false);
  
              }
          }
      });
      }
      return v;
  }
  </code></pre>