【发布时间】:2015-11-01 03:11:44
【问题描述】:
我们正在构建一个相机应用程序,将照片保存在图库中的特定文件夹中。我们必须使用意图在图库中打开我们应用程序的文件夹。我们正在使用此代码,但它显示了所有文件夹。
View.OnClickListener goToGallery = new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent();
intent.setAction(android.content.Intent.ACTION_VIEW);
intent.setType("image/*");
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
}
};
【问题讨论】:
标签: java android android-intent