【发布时间】:2012-06-05 22:21:03
【问题描述】:
我的应用程序需要从图库中选择一张图片。
我开始活动:
Intent intent = new Intent();
intent.setType("image/*");
intent.setAction(Intent.ACTION_GET_CONTENT);
startActivityForResult(Intent.createChooser(intent,"Select Picture"), PICK_IMAGE);
它会提示从图库或 OI 文件管理器中选择
对于 OI 文件管理器,我从 Uri 获取路径如下:
Uri selectedImageUri = data.getData();
filemanagerstring = selectedImageUri.getPath();
现在如何从文件管理器字符串中获取位图图像?
【问题讨论】:
标签: android