选择使用GalleryView多张图片 [英] Select Multiple Images Using GalleryView

查看:130
本文介绍了选择使用GalleryView多张图片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是想知道如果机器人已经建立在code,这样我可以选择在画廊查看多张图片,然后让这些图像导出为一个字符串数组的文件名(如/sdcard/~f1.jpg, /sdcard/~f2.jpg,...)。

I was just wondering if Android had built in code so that I could select multiple images in a gallery-view and then have those images exported as filenames in a string array(ex /sdcard/~f1.jpg, /sdcard/~f2.jpg,...).

再次任何帮助AP preciated!只是为了让你们知道,我使用的优良工程(一个图像)画廊 - 因为它正确导出的文件名。只需要知道,如果有一个简单的方法来选择倍数和导出。再次感谢!

Again any help is appreciated! Just to let you guys know, the gallery I'm using works fine (for one image) -- as in it exports the filename correctly. Just need to know if there is an easy way to select multiples and export them. Thanks again!

推荐答案

画廊插件默认情况下,不支持多选。我相信一一这确实是ListView控件,使用choiceMode属性(设置为2,多选)。

The gallery widget doesn't support multiple selection by default. I believe the one one which does is ListView, using the choiceMode attribute (set to 2 for multiple selection).

您可以尝试扩展的ListView到自定义的视图,其格式的图像,你所需要的。

You could try extending ListView into your own custom view which formats the images as you need.

另一种选择是延长图库查看并添加自己的code,允许多选。您会需要重写相当多的方法以允许多个选择。看看Android操作系统code,看看他们是如何做的。

The other option is to extend the gallery view and add in your own code to allow multiple selection. You would need to override quite a few methods to allow for multiple selection. Take a look at the android source code to see how they did it.

这篇关于选择使用GalleryView多张图片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆