标签:des android code http ext get
try {
HttpGet httpRequest = new
HttpGet(edtUrl.getText()
.toString());
HttpClient httpclient =
new DefaultHttpClient();
HttpResponse response = (HttpResponse)
httpclient
.execute(httpRequest);
HttpEntity entity =
response.getEntity();
BufferedHttpEntity bufferedHttpEntity = new
BufferedHttpEntity(
entity);
InputStream is =
bufferedHttpEntity.getContent();
Bitmap bitmap =
BitmapFactory.decodeStream(is);
ImageView iv = (ImageView)
MainActivity.this
.findViewById(R.id.imageView1);
iv.setImageBitmap(bitmap);
} catch (Exception e) {
// TODO: handle
exception
}
android 显示internet 图片,布布扣,bubuko.com
标签:des android code http ext get
原文地址:http://www.cnblogs.com/honeynm/p/3784010.html