如何通过打开图像打开特定文件夹? [英] How to open a spesific folder by opening image?
本文介绍了如何通过打开图像打开特定文件夹?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨。我需要在sd memory中加载一个图像。我需要从内存中打开一个特定的文件夹。但是我不知道叫它。请帮助我。
我尝试了什么:
当我想要一个图像时,它打开图库文件夹。
Hi.I need load an image in sd memory.i need open a specific folder from memory.but i don;t know call it.please help me.
What I have tried:
when i want choese an image, it open gallery folder.
推荐答案
你需要触发它的相应意图。
You need to trigger the respective intent for it.
Intent intent = new Intent();
// Show only images, no videos or anything else
intent.setType("image/*");
intent.setAction(Intent.ACTION_GET_CONTENT);
// Always show the chooser (if there are multiple options available)
startActivityForResult(Intent.createChooser(intent, "Select Picture"), PICK_IMAGE_REQUEST);
参考: Android从意图库中选择图像 - 代码理论 [ ^ ]
希望,有帮助:)
Reference: Android Pick/Select Image from Gallery with Intents – Code Theory[^]
Hope, it helps :)
这篇关于如何通过打开图像打开特定文件夹?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文