public class ImageTools {
public static Bitmap getIcon(String path) {
Bitmap bitmap = null;
try {
URL url = new URL(path);
URLConnection connection = url.openConnection();
InputStream stream = connection.getInputStream();
bitmap = BitmapFactory.decodeStream(stream);
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
return bitmap;
}
}
Bitmap bitmap=ImageTools.getIcon("http://write.blog.youkuaiyun.com/postlist")
imageView.setImageBitmap(bitmap)