Here you can find the source of loadImageFromUrl(String url)
public static Drawable loadImageFromUrl(String url)
//package com.java2s; import java.io.IOException; import java.io.InputStream; import java.net.MalformedURLException; import java.net.URL; import android.graphics.drawable.Drawable; public class Main { public static Drawable loadImageFromUrl(String url) { URL m;/*from w w w .j a v a 2 s. com*/ InputStream i = null; try { m = new URL(url); i = (InputStream) m.getContent(); } catch (MalformedURLException e1) { e1.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } Drawable d = Drawable.createFromStream(i, "src"); return d; } }