调用web service 返回一段话
hello world!! <img src="http://www.xxx.com/hello.jpg">
然后把这段话存入mapmap.put("con",html);然后弄到适配器,并送到GridView显示但是显示出来还是这句话,,如何显示图片是否要在map.put("con",html);这个操作之前有啥处理?????
需要代码解释
hello world!! <img src="http://www.xxx.com/hello.jpg">
然后把这段话存入mapmap.put("con",html);然后弄到适配器,并送到GridView显示但是显示出来还是这句话,,如何显示图片是否要在map.put("con",html);这个操作之前有啥处理?????
需要代码解释
解决方案 »
- 买了本android应用开发揭秘关于游戏开发那章的问题
- google翻译的API怎么用?
- 请教下各位getCurrentPosition方法的返回值是个什么值?
- android 运行出错
- 请问ubuntu下emulator启动不了,log如下:
- 用HttpURLConnection获得链接,怎样处理联网失败的情况
- 如何使得EditText控件不会因输入字符过长而改变长度?
- 如何向values文件夹下添加一个新的xml配置文件
- android自动接听
- 将最外层的RelativeLayout 替换成 LinearLayout 底部导航栏就消失,这是为什么?
- android4.0系统下不能全屏播放视频。
- android 中 SQLite 如何保存图片,用Blob类型进行保存!!!!
/**
* 从网络上下载
*
* @param url
* @return
*/
public static Bitmap getBitMapFromUrl(String url) {
URL myFileUrl = null;
Bitmap bitmap = null;
try {
myFileUrl = new URL(url);
HttpURLConnection conn = (HttpURLConnection) myFileUrl
.openConnection();
conn.setDoInput(true);
conn.connect();
InputStream is = conn.getInputStream();
bitmap = BitmapFactory.decodeStream(is);
is.close();
} catch (Exception e) {
e.printStackTrace();
}
return bitmap;
}