【发布时间】:2015-04-09 04:43:05
【问题描述】:
ImageView img1;
img1 = (ImageView) findViewById (R.id.img1);
URL newurl = new URL("http://10.0.2.2:80/Gallardo/Practice/files/images/donut.jpg");
Bitmap mIcon_val = BitmapFactory.decodeStream(newurl.openConnection() .getInputStream());
img1.setImageBitmap(mIcon_val);
我从 url 获取图像,但我想将其存储到我的 drawable 中,如何?
【问题讨论】:
-
我不认为这是一个好主意.. 你为什么不能保存到 sdcard