13

I have Image Gridview and I want to add images ONE by ONE to gridview selecting from gallery or image captured from camera.

Padma Kumar
  • 19,893
  • 17
  • 73
  • 130
Jaykumar Donga
  • 380
  • 1
  • 3
  • 18
  • hey i have a query please provide me some details .... do u want to add selected image from gallery on grid view or all image to be shown on grid view which are present in gallery .... – Nipun Gogia Feb 11 '13 at 07:41

1 Answers1

4

What you can do in your case is always have an image assigned to the last item of your Grid View. Clicking on that last item you can create a popup asking for you to take it to you gallery or for camera. Now if the user clicks on back button or decides to cancel keep showing that last populated '+' sign image in your grid view else if any other option is opted you can navigate to the desired action by having in an onActivityResult(). if the result code is positive and you may continue with:

1) Delete the last item from grid view i.e, the '+' sign image
2) Appending the image either taken from camera or gallery
3) Appending the image having '+' sign itself

And always put a condition for the last item of your grid view to point it to the dialog for Navigating to gallery or Click from camera. For other items you may continue with your desired requirements.

Let me know if it helped.

Thanks

abhy
  • 933
  • 9
  • 13