I need to set an image to an ImageSwitcher by downloading it from server. But the universal image loader seems to take ImageView as a parameter.
I read that we can use ImageAware to display image on any android view.
Can someone help me how to go about this ?
Thanks, Sneha
Use loadImage
instead. That will get you a bitmap that you can use to do whatever you want with it.
// Load image, decode it to Bitmap and return Bitmap to callback
imageLoader.loadImage(imageUri, new SimpleImageLoadingListener() {
@Override
public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {
// Do whatever you want with Bitmap
}
});