Uma simples função para carregar imagens, de URL externas em Android
Tuesday, July 5, 2011 5:56:52 PM
public Drawable getImageURL(String url) {
Drawable image;
URL imageUrl;
try {
imageUrl = new URL("http://"+url);
Bitmap bitmap = BitmapFactory.decodeStream(imageUrl.openStream());
image = new BitmapDrawable(bitmap);
} catch (Exception e) {
//Log.e(DEBUG_TAG, "Decoding Bitmap stream failed.");
image = null;
}
return image;
}

