Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

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! ;)

— asked November 8th 2010 by Francesco Soccolini
  • android
  • gallery
  • imageview
  • mobile
  • replace
0 Comments

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

    — answered November 8th 2010 by Paul Dowsett
    permalink
    1 Comment
    • This probably should have been a comment instead of another answer. :)

      — commented June 1st 2013 by Tyler Reid
  • Just set the image property:

    myImageView.image = '/path/to/new/image.png';

    If this isn't what you want, please gist your code.

    — answered November 8th 2010 by Paul Dowsett
    permalink
    1 Comment
    • 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.

      — commented November 8th 2010 by Francesco Soccolini
  • 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.

    — answered November 8th 2010 by Francesco Soccolini
    permalink
    2 Comments
    • This is a comment - not an answer, Francesco! ;-p

      — commented November 8th 2010 by Paul Dowsett
    • You haven't included postPhoto's creation in your gist :-/

      — commented November 8th 2010 by Paul Dowsett
  • 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:

    photoGallery.js

    — answered November 8th 2010 by Paul Dowsett
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.