Titanium Community Questions & Answer Archive

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

Animation while incrementing height of Textarea

Hi ,

Iam trying to increment height of textarea using animation- so that the textarea's height increases smoothly (like drawer sliding effect). Iam not able to achieve this on Android.

var box = Ti.UI.createTextArea({
top:200,
left:380,
height:80,
width:300,
text:'' });

box.addEventListener('click', function() {
var animHeight = Ti.UI.createAnimation();
animHeight.duration=5000;
animHeight.height=300;
box.animate(animHeight);
});

================

This doesn't work, I tried using scaling, this kind of increases both height and width but I want only the height to increase.

Please can someone provide sample code / hints to go about this

-thanks

— asked November 1st 2010 by Liping Zong
0 Comments

1 Answer

  • try this

    box.animate({height:300, duration:5000});
    
    — answered November 1st 2010 by Dan Tamas
    permalink
    1 Comment
    • Thank you Tamas,
      This did not work for me , which version of SDK are you using. I have sdk 1.4.2 (from one of the daily builds) running on Windows machine.

      -regards

      — commented November 1st 2010 by Liping Zong
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.