tags:

views:

381

answers:

1

OK, so I think I've exhausted searching for this question, and it's either that I'm totally missing something or nobody else has tried to create a GridView (showing images) which allows the user to select multiple images. Basically I want to have the orange selection box appear whenever a user selects an image, or disappear if the user has already chosen the image.

Is this something that I'll have to roll myself with a customer View? I may also try including a CheckBox with each image and have the CheckBox selected if the image is.

Any assistance would be greatly appreciated.

  • michael
A: 

There is no multi-select anywhere in standard Android except via checkboxes.

Now, you can turn off the built-in orange highlight via android:listSelector="#00000000" (transparent), and then render your own stuff to indicate selected/unselected items (e.g., change the background of selected items). The tricky part would be supporting both touch screens (easy) and trackball/D-pad (tough, because you also need to separately highlight the "current" cell independent of whether or not it is selected).

CommonsWare