1.[url]http://mobile.51cto.com/android-266971.htm[/url]
2.[url]http://www.cnblogs.com/xiaoxiaoboke/archive/2011/06/24/2089035.html[/url]
3.[url]http://www.eoeandroid.com/thread-22678-1-1.html[/url]
一般解析xml后获得图片地址,需要显示到ImageView中,
2.[url]http://www.cnblogs.com/xiaoxiaoboke/archive/2011/06/24/2089035.html[/url]
3.[url]http://www.eoeandroid.com/thread-22678-1-1.html[/url]
一般解析xml后获得图片地址,需要显示到ImageView中,
public Bitmap getBitmap(){
Bitmap mBitmap = null;
try {
URL url = new URL(imageUrl);
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
InputStream is = conn.getInputStream();
mBitmap = BitmapFactory.decodeStream(is);
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
return mBitmap;
}