1

I'm using Novoda ImageLoader (https://github.com/novoda/ImageLoader) and when I use this loader in CursorAdapter everything is fine. But when I want to use without any Adapter in Activity with one ImageView, I get same image for different URLs.

//onCreate in Activity   
imageManager = MyApplication.getImageLoader(); 
imageTagFactory = new ImageTagFactory(this, R.drawable.ic_refresh_inverse);
imgView = (ImageView) findViewById(R.id.imgIV);


//fillData - when I finish loading img URL from DB with CursorLoader
imgView.setTag(imageTagFactory.build(imgURL));
imageManager.getLoader().load(imgView);

//code in onCreate Application
LoaderSettings settings = new SettingsBuilder().withDisconnectOnEveryCall(true).withCacheManager(new LruBitmapCache(this)).build(this);
imageManager = new ImageManager(this, settings);

When I looked to the cache directory, the different image is loaded, but not used. Any idea where can be problem or how to properly use this library to simply load only one image?
Thank you!

Blundell
  • 75,855
  • 30
  • 208
  • 233
Warlock
  • 2,481
  • 4
  • 31
  • 45

1 Answers1

1

The issue is probably similar to this https://github.com/novoda/ImageLoader/issues/41 do you have query parameters in the url? if so try to add this .withEnableQueryInHashGeneration(false) on the setting builder

This is a bug that is inverting the logic behind the parameter enableQueryInHashGeneration. This parameter should enable/disable (by default should be enable) the query part of the url in the generation of the hashname of the image. This is useful when you have session token in the url as a parameter and you don't want to download the same image over and over.

The problem will be solved in the 1.5.6 version

Luigi Agosti
  • 925
  • 10
  • 19