问题
i want to display multiple images capture by camera to Grid view. i go through many questions how to do but non perfectly work for me. i use This to implement. but using this i am able to get the image in my image view but whenever i capture new image that image replace my older image. and now i am clue less what should i do to add camera images one after another. anyone know how to implement this then please help me with sample code. thank you in advance.
回答1:
Use the comment provided in the answer in this link:
showing camera capture image to gridview
This should serve your purpose. Hope this helps. Let me know if you face any issues
You maintain a list out the onActivityResult. Initialize the list as a class variable means
ArrayList<Contact> imageArry = new ArrayList<Contact>();
add this line after class definition when you declare your variables. That should make you add multiple images
来源:https://stackoverflow.com/questions/61039248/displaying-multiple-camera-images-to-grid-view