Titanium Community Questions & Answer Archive

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

Animating Opacity Problems

I am trying to set a Label to animate with a duration from Opacity: 1 to Opacity: .2 (Or really anything).. Below is how I defined my Label and the animate function I ran on it. What happens is that it will animate to the correct opacity and then as soon as it is done it will just "pop" back to Opacity: 1…? Do you have any ideas?

var Image = Titanium.UI.createLabel({
    color:'#FFF',
    backgroundImage: 'image9.png',
    bottom: 76,
    left: 54,
    opacity: 1,
    width: 67,
    height: 67
});
Image.animate({opacity: .2, duration: 1000});
— asked June 30th 2010 by James Armstead
  • label
  • opacity
0 Comments

4 Answers

  • Accepted Answer

    Android or iPhone? I have run into animation problems on Android and the support is not complete yet.

    — answered June 30th 2010 by Damien Elmes
    permalink
    0 Comments
  • Is there even a way to just set the opacity of Label or View or anything and have it actually stay? What is the point of being able to animate to a different opacity and have it not stay?

    — answered June 30th 2010 by James Armstead
    permalink
    0 Comments
  • Does that animate thing have a callback? If so, you could just set the opacity to 0.2 after completing the animation. :)

    — answered June 30th 2010 by Dominik Hahn
    permalink
    0 Comments
  • @Dominik I actually did try that, I even tried to do a Hide() and Show() after it.. it is still a no go, it just shows up as the full image still. Very frustrating!

    — answered June 30th 2010 by James Armstead
    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.