title: Android custom adapter listView looping more
body: <p>I am trying to create a custom adapter for my <code>listView</code>. Here is my <code>CustomAdapter</code> class-</p>
  
  <pre><code>public class CustomAdapter extends ArrayAdapter&lt;Custom&gt;{
  private ArrayList&lt;Custom&gt; entries;
  private Activity activity;
  private int height;
  
  public CustomAdapter(int hei, Activity a, int textViewResourceId, ArrayList&lt;Custom&gt; entries) {
      super(a, textViewResourceId, entries);
      this.entries = entries;
      this.activity = a;
      this.height=hei;
  }
  
  public static class ViewHolder{
      public TextView item1;
      public ImageView image;
  
  }
  
  @Override
  public View getView(int position, View convertView, ViewGroup parent) {
      View v = convertView;
      ViewHolder holder;
      if (v == null) {
          LayoutInflater vi =
              (LayoutInflater)activity.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
          v = vi.inflate(R.layout.review_list_m, null);
          v.setMinimumHeight(height);
          holder = new ViewHolder();
          holder.item1 = (TextView) v.findViewById(R.id.name);
          holder.image = (ImageView) v.findViewById(R.id.posterView);
          v.setTag(holder);
      }
      else
          holder=(ViewHolder)v.getTag();
  
      final Custom custom = entries.get(position);
      if (custom != null) {
          String imgUrl=custom.getImage();
          Log.v("PATH",custom.getcustomBig()); 
          holder.item1.setText(custom.getcustomBig());
  
      }
      return v;
   }
  
  }
  </code></pre>
  
  <p>Then I entered only two values in customclass.<br/>
  But the following line log in 6 times</p>
  
  <pre><code>Log.v("PATH",custom.getcustomBig()); 
  </code></pre>
  
  <p>Something like following</p>
  
  <pre><code>01-09 11:49:34.683: V/PATH(12629): Name 1
  01-09 11:49:34.683: V/PATH(12629): Name 2
  01-09 11:49:34.683: V/PATH(12629): Name 1
  01-09 11:49:34.683: V/PATH(12629): Name 2
  01-09 11:49:34.683: V/PATH(12629): Name 1
  01-09 11:49:34.683: V/PATH(12629): Name 2
  </code></pre>
  
  <p>But showing only 2 entries in listView. </p>
  
  <p>Anything weird ? Because I need to implement download image script on <code>listView</code>. In that case will that image get downloaded more than 1 times ?</p>