-3
我正在创建一个“隐藏图片”应用程序,它将所选图片从图库复制到应用程序内存。它完美地工作,并成功地将图像复制到应用程序内存位置/data/data/com.isummation.customgallery/files/
,并在ListView
中显示保存的图像。然而,我要显示的图像在一个文件夹视图,这样的形象:如何查看内存的图片
我能做些什么来达到这种效果呢?
我正在创建一个“隐藏图片”应用程序,它将所选图片从图库复制到应用程序内存。它完美地工作,并成功地将图像复制到应用程序内存位置/data/data/com.isummation.customgallery/files/
,并在ListView
中显示保存的图像。然而,我要显示的图像在一个文件夹视图,这样的形象:如何查看内存的图片
我能做些什么来达到这种效果呢?
试试这个:
Intent intent = new Intent();
intent.setType("image/*");
intent.setAction(Intent.ACTION_GET_CONTENT);
startActivityForResult(
Intent.createChooser(intent, "Select Picture"),
SELECT_PICTURE);
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
switch (requestCode) {
case SELECT_PICTURE: {
if (resultCode == RESULT_OK) {
Uri selectedImageUri = data.getData();
mCurrentPhotoPath = getPath(selectedImageUri);
handlePhotoSelected();
}
break;
} // SELECT_PICTURE
} // switch
}