问题
How can I access the height and width of an image loaded using the Android Universal Image Loader?
回答1:
You can get Bitmap of image when image was loaded using ImageLoadingListener:
imageLoader.displayImage(imageUrl, imageView, [options], new SimpleImageLoadingListener() {
@Override
public void onLoadingComplete(Bitmap loadedImage) {
int width = loadedImage.getWidth();
int height = loadedImage.getHeight();
//...
}
});
来源:https://stackoverflow.com/questions/14331062/how-to-get-height-and-width-of-image-with-android-universal-image-loader