Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Select Multiple Images Using GalleryView

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 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!

like image 413
hwrdprkns Avatar asked Jun 17 '10 04:06

hwrdprkns


2 Answers

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.

like image 86
matto1990 Avatar answered Sep 28 '22 02:09

matto1990


I would like to point you to the following library. It seems to do what you want. There's also the ability to create your own gallery like explained in this tutorial

like image 33
Bart Burg Avatar answered Sep 28 '22 04:09

Bart Burg