Replace image on imageView
Hi.
I want to put an image on imageview selecting pics from image gallery.
That is ok.
How could i replace image on imageview if i select another image from gallery?
The new selected image appears above the older image.
Please Help. I'll go crazy! ;)
4 Answers
-
Accepted Answer
Francesco
If my answer has moved you closer to your solution, and it is now resolved, would you mind marking it as the best answer to close it?
Thanks
Hal
-
Just set the image property:
myImageView.image = '/path/to/new/image.png';
If this isn't what you want, please gist your code.
-
Hi. Thanx
Below the gist link with my code.
https://gist.github.com/667756
What i want is replace image in imageview every time i select a new image from gallery.
Thanx again. Tour help is really appreciate.
-
Francesco
Find my version of your code underneath. As you have missed part of your code, I may have made errors, and also bear in mind that I haven't actually tested it. Hopefully this will give you a better idea of how to do it nonetheless: