Titanium Community Questions & Answer Archive

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

Customize animated:true


I'm curious how I can customize how a window is closed. I ran across the animated:true property, where I can enable or disable animation:


That works, but I'm curious how I can implemented a custom animation. All I'm looking for is a way to slide the window from the left to the right, or vice versa.

How can I accomplish this? "animated" is very general, but I'd like to customize that.

I'm also curious where "animated" is documented, I wasn't able to find anything in the documentation.

Thank you.

— asked November 3rd 2010 by Ingmar Koecher
  • animation
  • iphone
  • mobile

1 Answer

  • Ingmar

    You may not have noticed that there is some more in-depth information on some, but not all, of the api doc pages. For example, a section about Window view animations can be found here.

    The close() animation and display properties argument is mentioned here, although admittedly the information is brief. You can reach this page by clicking on the close method of the view (in this case, the Window view) page.

    Searching the KitchenSink for the string "animated:" will bring up 41 examples, although mostly used with Titanium.UI.currentTab.open()/close(). This makes it apparent that animated takes a boolean value. You can experiment by changing between the two values in the KS, relaunching the app, and noting the result.

    For more complex animations, investigate transforms, such as the one in this example of the KS.

    Hope this is useful

    — answered November 5th 2010 by Paul Dowsett
    1 Comment
    • "Hope this is useful Hal" Well, it certainly was for me! :D I had this same question, so I suppose transforms are the way to go. Thanks!

      — commented May 25th 2012 by Joshua Lambert
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.