ImageView简单加载网络图片实例代码
程序员文章站
2023-01-02 08:46:37
复制代码 代码如下: private void loadimage() { mimageview = (imageview) findviewbyid(r.id.image...
复制代码 代码如下:
private void loadimage() {
mimageview = (imageview) findviewbyid(r.id.imageview);
try {
url url = new url("http://images.csdn.net/20130609/zhuanti.jpg");
mimageview.setimagebitmap(bitmapfactory.decodestream(url.openstream()));
} catch (exception e) {
}
}