可能重复:
如何通过代码打开手机图库
我在我的应用程序中输出了一张图片。我可以调用默认Android的画廊来显示图像,而不是使用ImageView来查看图像。非常感谢!
可能重复:
如何通过代码打开手机图库
我在我的应用程序中输出了一张图片。我可以调用默认Android的画廊来显示图像,而不是使用ImageView来查看图像。非常感谢!
您应该能够使用此代码在图库中显示图像..
Intent intentquick = new Intent(Intent.ACTION_VIEW);
intentquick.setDataAndType(<full path to image to be displayed>,"image/*");
intentquick.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intentquick);
试试这个打开画廊
Intent intent = new Intent();
intent.setType("image/*");
intent.setAction(Intent.ACTION_GET_CONTENT);//
startActivityForResult(Intent.createChooser(intent, "Select Picture"),10);