title: How to use NetworkImageView in a ListView
body: <p>I am new in Android and I got stuck on something.
  I have a LisView and I am trying to download images using NetworkImageView, but I can't manage to do it. </p>
  
  <p>I have this in onCreate method:</p>
  
  <pre><code>networkImageView = (NetworkImageView) findViewById(R.id.thumbImageUrl);
  mRequestQueue = Volley.newRequestQueue(this);
  imageLoader = new ImageLoader(mRequestQueue, new BitmapLruCache(BitmapLruCache.getDefaultLruCacheSize()));
  
  networkImageView.setImageUrl(IMAGE_URL, imageLoader);
  </code></pre>
  
  <p>but it doesn't work and I don't know why.</p>
  
  <p>Can anybody tell me how to do it? I think I didn't understood too well how to use NetworkImageView.</p>
  
  <p>PS: my BitmapLruCache.java</p>
  
  <pre><code>public class BitmapLruCache extends LruCache&lt;String, Bitmap&gt; implements ImageCache {
  
      public static int getDefaultLruCacheSize() {
          final int maxMemory = (int) (Runtime.getRuntime().maxMemory() / 1024);
          final int cacheSize = maxMemory / 8;
  
          return cacheSize;
      }
  
      public BitmapLruCache() {
          this(getDefaultLruCacheSize());
      }
  
      public BitmapLruCache(int sizeInKiloBytes) {
          super(sizeInKiloBytes);
      }
  
      @Override
      protected int sizeOf(String key, Bitmap value) {
          return value.getRowBytes() * value.getHeight() / 1024;
      }
  
      @Override
      public Bitmap getBitmap(String url) {
          return get(url);
      }
  
      @Override
      public void putBitmap(String url, Bitmap bitmap) {
          put(url, bitmap);
      }}
  </code></pre>