由网友(厌世)分享简介:我要开始为多选建库的活动。I want to start in built gallery activity for multiple selection.我曾尝试this,但它仅选择一个图像。I have tried this, but it selects only one image.在此先感谢..!推...
我要开始为多选建库的活动。
I want to start in built gallery activity for multiple selection.
我曾尝试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);
相关推荐
最新文章