如何programattically关闭默认的画廊? [英] how to close default gallery programattically?
问题描述
我用这code
Intent photoPickerIntent = new Intent(Intent.ACTION_PICK,android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
photoPickerIntent.setType("image/*");
photoPickerIntent.setAction(Intent.ACTION_GET_CONTENT);
photoPickerIntent.addCategory(Intent.CATEGORY_OPENABLE);
photoPickerIntent.putExtra(Intent.EXTRA_LOCAL_ONLY, true);
startActivityForResult(Intent.createChooser(photoPickerIntent, "Image File Picker"), 1000);
来接我的应用程序中,从SD卡的图像。
to pick image from sdcard within my application.
这是工作的罚款,按照我的要求,我需要关闭ACTION_PICK chooserActivity自己,当我们接触,将关闭对话框之外喜欢精致...
this is working fine, according to my requirement i need to close that ACTION_PICK chooserActivity myself, like when we touch outside the dialog that will closed fine...
但如何才能关闭此对话框类型的编程。
but how can we close this type of dialog programatically..
有人请给我一些建议......
anyone pls give me some suggestion......
推荐答案
您不能。
这选配实际上是一个独立的活动,意图通过发动(将通过意向推出另一项活动,当用户选择的东西)。
That chooser is actually a separate activity, launched by intent (which will then launch another activity via intent when the user selects something).
您不控制选择器,它实际上不是在您的应用程序。
You don't control that chooser, its not actually in your app.
这篇关于如何programattically关闭默认的画廊?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!