views:

307

answers:

1

Hi guys,

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,...).

Again any help is appreciateds! 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!

+2  A: 

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).

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

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.

matto1990
@matter1990: I looked at the code for the Android GalleryView, but I couldn't find anything specific that allowed them to select multiple views. I thought they would have had to make their own custom view, but I couldn't find a .java file for the view. Maybe I was looking in the wrong spot.
hwrdprkns
There is no code in galleyview to support multiple selection. You need to extend it to add this functionality. I'm not sure exactly where the code is found but a good start is the android source website:source.android.com
matto1990