I have Image Gridview and I want to add images ONE by ONE to gridview selecting from gallery or image captured from camera.
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
I think below links will help you to create that..
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With