Android之博客案例 及 获取指定URL的网页内容



<ImageView android:id="@+id/imgv2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/aa" />


通过读取Http的图像资源来获取
URL aURL = new URL("http://your-server/imagexxx.jpg");
URLConnection conn = aURL.openConnection();
conn.connect();
InputStream is = conn.getInputStream();
BufferedInputStream bis = new BufferedInputStream(is);
bm = BitmapFactory.decodeStream(bis);
bis.close();
is.close();
iv.setImageBitmap(bm);


Android之博客案例 及 获取指定URL的网页内容

更多相关文章

  1. Android WindowManager$BadTokenException异常应对案例
  2. Android中 WebView打开一个网页实例
  3. android 从EditText中获取内容
  4. Android 通过网页打开自己的APP(scheme)
  5. cocos2d-x打开网页android与ios平台
  6. Android 读取配置文件的内容
  7. Android 获取扫码枪的扫描内容
  8. android按行读取文件内容的几个方法
  9. Android 网页html源码的查看器

随机推荐

  1. 解决Android的ListView控件滚动时背景变
  2. Android(安卓)eclipse - aapt.exe has st
  3. Android常见问题总结(五)
  4. Androidの自定义进度条ProgressBar实现
  5. Android(安卓)Service学习
  6. 将项目从Eclipse转到Android(安卓)Studio
  7. android的手势识别例子
  8. Android消息机制
  9. android:限制文本长度加省略号用ellipsize
  10. Android的Activity中setContentView到底