I have a question regarding the https://github.com/nostra13/Android-Universal-Image-Loader library.
I'm using imageLoader.displayImage(...) to load images from my database to imageviews, that are in a listview.
The docs say this:
ImageSize targetSize = new ImageSize(120, 80); // result Bitmap will be fit to this size
imageLoader.loadImage(imageUri, targetSize, displayOptions, new SimpleImageLoadingListener() {
@Override
public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {
// Do whatever you want with Bitmap
}
});
Would it be possible to declare a target size for the imageLoader.displayImage method?
You can use method: public void loadImage(String uri, ImageSize targetImageSize, DisplayImageOptions options, ImageLoadingListener listener)
to set a ImageSize
parameter.
The downloaded image will be decoded and scaled to Bitmap of the size which is equal or larger (usually a bit larger) than incoming targetImageSize.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With