如何在imageview中显示外部存储图像 [英] How to display external storage image in imageview
本文介绍了如何在imageview中显示外部存储图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想显示外部存储图像,例如:
I want to display external storage image like:
"storage/sdcard0/image.jpg"
"storage/sdcard0/image.jpg"
在我的android应用程序中.
in my android application.
有人可以指导我如何实现这一目标吗?
can any one guide me how to achieve this?
推荐答案
如果您的图片位于sdcard的根文件夹中,则可以通过
If your image is in the root folder of sdcard then access it through
Bitmap bmp = BitmapFactory.decodeFile(Environment.getExternalStorageDirectory().toString + File.separator + "yourimage.jpg");
webImage.setImageBitmap(bmp);
这篇关于如何在imageview中显示外部存储图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文