Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/218.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 在给定文件名的gallery应用程序中显示照片_Java_Android_Android Intent_Android Image_Android Gallery - Fatal编程技术网

Java 在给定文件名的gallery应用程序中显示照片

Java 在给定文件名的gallery应用程序中显示照片,java,android,android-intent,android-image,android-gallery,Java,Android,Android Intent,Android Image,Android Gallery,我正在尝试在默认的gallery应用程序中显示多个图像。我可以显示一个带有 Intent intent = new Intent(); intent.setAction(Intent.ACTION_VIEW); intent.setDataAndType(Uri.parse("insert_filename_here"), "image/*"); startActivity(intent); 但我想打开多个。我以前问过这个问题,并且链接到其他线程,但答案只是如何选择多个图像。我只是想展示一下。

我正在尝试在默认的gallery应用程序中显示多个图像。我可以显示一个带有

Intent intent = new Intent();
intent.setAction(Intent.ACTION_VIEW);
intent.setDataAndType(Uri.parse("insert_filename_here"), "image/*");
startActivity(intent);
但我想打开多个。我以前问过这个问题,并且链接到其他线程,但答案只是如何选择多个图像。我只是想展示一下。我找到了它们是否在同一文件夹中的答案,但我的文件夹中有其他我不想显示的图像。非常感谢您的帮助

我可以显示一个带有

Intent intent = new Intent();
intent.setAction(Intent.ACTION_VIEW);
intent.setDataAndType(Uri.parse("insert_filename_here"), "image/*");
startActivity(intent);
首先,这不一定与“默认画廊应用程序”有关。它将打开用户想要的任何应用程序,包括安装的支持MIME类型
image/*
ACTION\u VIEW
以及该
Uri
中的任何方案的应用程序

其次,没有单一的“默认画廊应用程序”。在数千种设备型号和大约20亿台安卓设备中,有几十种(如果不是几百种的话)的“默认库应用程序”实现

但我想打开多个

您必须为此编写自己的UI

我找到了它们是否在同一文件夹中的答案


没有要求任何Android设备都有任何能够一次显示多个图像的应用程序。没有标准的
Intent
结构用于请求查看多个内容。

好的。非常感谢。