如何从在建库的所有图片我的应用程序...? [英] how to get all the images from in built gallery to my application...?
本文介绍了如何从在建库的所有图片我的应用程序...?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我要开始为多选建库的活动。
I want to start in built gallery activity for multiple selection.
我曾尝试<一href="http://stackoverflow.com/questions/2169649/open-an-image-in-androids-built-in-gallery-app-programmatically">this,但它仅选择一个图像。
I have tried this, but it selects only one image.
在此先感谢..!
推荐答案
您必须创建自己有复选框选择多个图像文件的图像列表。
You have to create your own list of images having checkboxes to select multiple image files.
使用下面的code,以获得光标库,并创建一个列表适配器,它会遍历光标,会给图像。此图像可以用来显示在列表视图中使用复选框。
Use the below code to get the cursor for gallery and create a list adapter which will iterate over cursor and will give image. This image can be used to show in list view with checkboxes.
String[] projection = { MediaStore.Images.Media.DATA };
Cursor cursor = managedQuery(uri, projection, null, null, null);
这篇关于如何从在建库的所有图片我的应用程序...?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文