打开图像形式内置图库
我已阅读此链接:以编程方式在 Android 的内置图库应用程序中打开图像 以编程方式从 Android 的内置图库应用程序获取/选取图像,代码看起来不错。
结果如下: https://i.sstatic.net/vz3S8.png,但这不是我想要的结果。
我想打开类似于以下内容的图库: https://i.sstatic.net/ZoUvU.png。 我想从文件夹库中选择图片。
你知道如何修改代码吗?
我使用:
Intent intent = new Intent();
intent.setComponent(new ComponentName("com.android.gallery", "com.android.camera.GalleryPicker"));
// intent.setType("image/*");
intent.setAction(Intent.ACTION_GET_CONTENT);
Log.i("aa","adafdsfa");
startActivityForResult(intent, 1);
通过我获取文件夹库,但无法获取图片路径。
I have read this link :Open an image in Android's built-in Gallery app programmatically Get/pick an image from Android's built-in Gallery app programmatically, and the code looks well.
It results with following image: https://i.sstatic.net/vz3S8.png, but this is not the result I want.
I want to open the gallery similar to: https://i.sstatic.net/ZoUvU.png.
I want to choose the pic form the folder gallery.
Do you know how to modify the code?
I used:
Intent intent = new Intent();
intent.setComponent(new ComponentName("com.android.gallery", "com.android.camera.GalleryPicker"));
// intent.setType("image/*");
intent.setAction(Intent.ACTION_GET_CONTENT);
Log.i("aa","adafdsfa");
startActivityForResult(intent, 1);
Through I get the folder gallery, but I cannot get the pic path.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)