title: Lazy Image Loader to ListView
body: <p>Well, I used this project as start point to my project:
  <a href="https://github.com/thest1/LazyList/" rel="nofollow">https://github.com/thest1/LazyList/</a></p>
  
  <p>Instead of his LazyAdapter I used one that i made, following:</p>
  
  <pre><code>public class CardAdapter extends ArrayAdapter&lt;Card&gt; {
      private Card[] cards;
      private Context context;
      private LayoutInflater mInflater; 
      public ImageLoader imageLoader; 
  
  
      public CardAdapter (Context context, int textViewResourcesId, Card[] cards)
      {
          super(context, textViewResourcesId, cards);
          this.cards = cards;
          this.context = context;
          mInflater = LayoutInflater.from(context);  
      }
  
      private static class ViewHolder {  
          public ImageView iconView;  
          public TextView nameTextView;  
          public TextView descText;
          public TextView manaText;
          public TextView atkdef;
          public TextView edicao;
          public TextView tipo;
      }  
  
      @Override  
      public View getView(int position, View convertView, ViewGroup parent) 
      {  
          ViewHolder holder;  
          if (convertView == null) {  
              convertView = mInflater.inflate(R.layout.listrow, parent, false); 
          TextView nameTextView = (TextView) convertView  
                      .findViewById(R.id.Nome);  
              TextView descText = (TextView) convertView  
                      .findViewById(R.id.descricao);  
              TextView manaText = (TextView) convertView  
                      .findViewById(R.id.mana);
              TextView atkdef = (TextView) convertView
              .findViewById(R.id.atkdef);
              TextView edicao = (TextView) convertView
                  .findViewById(R.id.edicao);
              TextView tipo = (TextView) convertView
                  .findViewById(R.id.tipo);
              ImageView iconView = (ImageView) convertView  
                      .findViewById(R.id.imageView1);
  
              holder = new ViewHolder();
              holder.nameTextView = nameTextView;
              holder.descText = descText;
              holder.manaText = manaText;
              holder.atkdef = atkdef;
              holder.edicao = edicao;
              holder.tipo = tipo;
              holder.iconView = iconView;  
              holder.iconView.setTag(cards[position].URL);
  
              convertView.setTag(holder);  
          } else {  
              holder = (ViewHolder) convertView.getTag();  
          }  
  
          holder.nameTextView.setText(cards[position].name);                                          holder.descText.setText(setSpanOnText(cards[position].descricao),BufferType.SPANNABLE);
          holder.manaText.setText(setSpanOnManaText(cards[position].mana), BufferType.SPANNABLE);
          if (cards[position].tipo.toLowerCase().contains("creature"))
              holder.atkdef.setText(cards[position].power + "/" + cards[position].toughness);
          else
              holder.atkdef.setText("");
          holder.edicao.setText("Edition: " + cards[position].edicao);
          holder.tipo.setText(cards[position].tipo); 
          holder.iconView.setTag(cards[position].URL);  
          imageLoader.DisplayImage(cards[position].URL, holder.iconView);
          return convertView;  
      }  
  }
  </code></pre>
  
  <p>It was working well, til the moment I added "imageLoader.DisplayImage(cards[position].URL, holder.iconView);" which is the lazy load part, it started to crash when i try to access the listview, someone have something in mind? I didnt change a bit in the ImageLoader/FileCache/MemoryCache/Utils from the other project...</p>
  
  <p>Thanks in advice!</p>