I know that there is probably an answer here on the site for my question, but when I looked I saw a lot of shapes and I was kind of lost.
I wanted to create a hidden folder and have some ImageButton
or something so I can select an image from the gallery (do not open the camera and take a photo at the time) and copy (without deleting the original image) / p>
I also need to resize this image if the selected image is very large, in the tests I did, the image was very large and covered a lot of the screen, and even covering other things, only part of the image appeared, to try to solve this problem I put a fixed size in the ImageButton
, so it did not cover the rest of the screen but it cut the image (it only showed one piece)
By the tests I've done, I imagine you should be creating a Intent
to open the gallery with a return, in that return you get the URI
of the image and transform that URI
into a path, so that you can copy it to another folder, and then in the folder transform the image into bitmap
, to be able to resize and then transform the bitmap
into URI
to save the path in the bank to then set using setImageUri()
in the rest of the application (in ImageView
ImageButton
), however if the user cancels or, in the future, delete the file, it would also be necessary to delete the moved image file to the created folder
Another question, what is the best way to get this image? With ImageView
, ImageButton
or what, if it has any pattern?
I saw several questions that answer to this but home question answered a part and when I was joined I could not, can anyone help?
If you know of a question that does this please pass the link