animating window opening (titanium) -
i want open window bottom top:
var controller = alloy.createcontroller('test', { title : 'test', }); var newwindow = controller.getview(); newwindow.animate(alloy.globals.animations.up); newwindow.open({ animated : true });
it doesn't seem working.
up : titanium.ui.createanimation({ top : (ti.platform.android) ? '48dp' : 0 })
var win = titanium.ui.createwindow({ title:"implement activity indicator", backgroundcolor:"#ffffff" }); var explorecalifornia = titanium.ui.createimageview({ image:"images/explorecalifornia.png", width:96, height:119, top:120 }); var animatebutton = titanium.ui.createbutton({ title:"go!", height:48, width:60, bottom:12, }); animatebutton.addeventlistener("click", function(e){ explorecalifornia.animate({top:50,duration:500}); var t = titanium.ui.create2dmatrix(); t = t.rotate(20); t = t.scale(1.5); //create animation object , set properties animate var = titanium.ui.createanimation({ top:60, duration:1000,//length of animation in ms transform:t//set transform object here }); //define event listener animation completion a.addeventlistener('complete', function(){ win.backgroundcolor = "#ffcc00"; var t = titanium.ui.create2dmatrix(); t = t.rotate(0); t = t.scale(1); var = titanium.ui.createanimation({ top:120, duration:1000,//length of animation in ms transform:t//set transform object here }); explorecalifornia.animate(a); }); explorecalifornia.animate(a); }); win.add(explorecalifornia); win.add(animatebutton); win.open();
titanium-alloy
No comments:
Post a Comment