-
Notifications
You must be signed in to change notification settings - Fork 6.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple calls with the same URL only gets 1 answer #510
Comments
Which lib version do you use? |
The latest one: 1.9.1 |
Ok, 1.9.1 introduces following change: "loadImage(...) call cancels previous task for the same image URI (#475)" In your case you should create ImageSize imageSize = ...;
ImageNonViewAware imageAware = new ImageNonViewAware(imageSize, ViewScaleType.CROP)
ImageLoader.getInstance().displayImage(source, imageAware, new SimpleListener()); |
Hi, |
Yes, you're right, you should use Is it going to be fixed? I think, no. Both variants (one common callback for the same URIs or separate callbacks for every call with the same URI) have their pros and cons but I decided to choose 1st one because this behavior of |
I was thinking the idea behind loadImage(...) is getting the bitmap in the callBack without the need to give ImageView. Base on that I think the solution should be separate callbacks for every call even with the same URI (you don't need to send the same requests again, just hold it until the first request is back an send all callbacks). |
Actually "common callback" isn't correct term, I shouldn't use it. If you want the following imageLoader.loadImage(imageUri, listener) with ImageSize imageSize = new ImageSize(width, height);
ImageNonViewAware imageAware = new ImageNonViewAware(imageSize, ViewScaleType.CROP)
ImageLoader.getInstance().displayImage(imageUri, imageAware, listener); Or you can change @Override
public int getId() {
return super.hashCode();
} and continue use |
And what if you do not know the target size? |
You can take the absolute width of the display in pixels. See method
Method getMaxImageSize
|
Thank you. |
Hi I also had the same problem have wrote custom class it use Imageloader find good solution. public class MyMusicImageLoader {
} |
Maybe it could help some people: |
Hi,
First of all, thank you so much for all your remarkable work, your lib really rocks!
I'm currently intregrating it in my project, and I found something strange. See the following snippet:
When calling method func(), "OnLoadingComplete" is only called once. What am I missing?
Thanks in advance.
Regards,
Christophe.
The text was updated successfully, but these errors were encountered: