加载本地图片

/**
	    * 加载本地图片
	    * @param url
	    * @return
	    */
	    public static Bitmap getLoacalBitmap(String url) {
	         try {
	        
	              FileInputStream fis = new FileInputStream(url);
	              return BitmapFactory.decodeStream(fis);  ///把流转化为Bitmap图片        

	           } catch (FileNotFoundException e) {
	              e.printStackTrace();
	              Log.d("www", "noyfund");
	              return null;
	         }
	    }
Bitmap bitmap = getLoacalBitmap(url);
ImageView imgContent=(ImageView) convertView.findViewById(R.id.img_what);
imgContent.setImageBitmap(bitmap);
相关文章
相关标签/搜索