摘要: 在设置ImageView资源的时候,这时的图片是来自SD卡,查看API很容易就会看到view.setImageUri(Uri u)这个函数。所以一般会这样写:ImageView view = (ImageView)findViewById(...);File file = new File(path);Uri uri = Uri.from(file);view.setImageUri(uri);但是这样做是不行的,因为setImageUri这个函数使不能读取SD卡中的文件的,只能读取手机本身的文件。所以改用以下这种方式:Bitmap bit = BitmapFactory.decodeFile 阅读全文
posted @ 2013-08-04 17:23 一个学渣 阅读(173) 评论(0) 推荐(0) 编辑

 

CSDNGitHub 联系邮箱:aikongmeng@gmail.com


Copyright 2008-2019 Government All Rights Reserved