Friday, September 16, 2011

Load Image From Url

Below function load image from web url and return drawable.

public static Drawable LoadImageFromWebOperations(String url)
{
try
{
InputStream is = (InputStream) new URL(url).getContent();
Drawable d = Drawable.createFromStream(is, "src name");
return d;
}
catch (Exception e)
{
return null;
}
}

No comments:

Post a Comment

Post a Comment