Recreating this animation in Titanium SDK

徘徊边缘 提交于 2019-12-03 00:50:39
Sagar B.

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.

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.

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

@ 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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!