Recreating this animation in Titanium SDK

前端 未结 4 439
醉酒成梦
醉酒成梦 2021-02-04 22:08

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 r

相关标签:
4条回答
  • 2021-02-04 22:43

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

    0 讨论(0)
  • 2021-02-04 22:45

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

    0 讨论(0)
  • 2021-02-04 23:02

    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.

    0 讨论(0)
  • 2021-02-04 23:04

    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.

    0 讨论(0)
提交回复
热议问题