 <pre><code>public Drawable loadImageFromURL(String url, String name) { try { InputStream is = (InputStream) new URL(url).getContent(); Drawable d = Drawable.createFromStream(is, name); return d; } catch (Exception e) { return null; } } </code></pre>