Kyle Decot
Kyle Decot

Reputation: 20835

Recreating this animation in Titanium SDK

I was previously developing my application in Xcode but decided to move over to Titanium to allow for Android development.

I'm still getting used to Titanium so I'm running into some problems when trying to rewrite my app. For instance: how would I go about recreating this animation in Titanium?

Basically I have UIView that contains a MKMapVIew, a UITableview and a button that toggle between them. Any help is greatly appreciated!

http://www.screenr.com/2kts

Upvotes: 2

Views: 3898

Answers (4)

Sagar B.
Sagar B.

Reputation: 486

You can use this code to flip window in ios and android both.

Create two animation objects

var anim_minimize = Titanium.UI.createAnimation({width:0,duration:500});
var anim_maximize = Titanium.UI.createAnimation({width:320,duration:500});

and animate TabGroup on button click will create same effect as FLIP.

So

tabGroup.animate(anim_minimize);

setTimeout(function(){

tabGroup.animate(anim_maximize);

},500);

Try this code.This will generate same effect as flip animation both in iOS and android.

I hope this will help us.

Upvotes: 6

The Zero
The Zero

Reputation: 1375

@ Zakaria is right. It will not work in android. You can do this flip animation using this static property (mentioned by zakaria) or you can use object of animation class to provide user defined animation. According to my knowledge this is the only two way available for animation in titanium.

even the user defined animation is not perfect in android.

Upvotes: 0

Aaron Saunders
Aaron Saunders

Reputation: 33345

Use the flip animation, there is an example in the kitchen sink

Upvotes: 0

Zakaria
Zakaria

Reputation: 15070

You can tell to the window to flip from the left :

myWindow.open({transition:Titanium.UI.iPhone.AnimationStyle.FLIP_FROM_LEFT});

But, as far as I know, this won't work for Android.

Upvotes: 3

Related Questions