Titanium window open animation left to right showing black screen
Titanium SDK: 3.1.2 Platform: Android Titanium Studio: 3.1.3. Hi all I am
new for Titanium and trying to add some animation to my window. When the
window opens, it should open from left to right. I have achieved this with
following code. But there is a problem, before showing animated window, a
black screen appears. So my questions are:- 1) What should i do to remove
the black screen..? 2) What should i do to close the same window with
animation right to left..?
//Application Window Component Constructor
var self = Ti.UI.createWindow({
backgroundColor:'#123',
navBarHidden:false,
exitOnClose:true
});
var devWidth = Ti.Platform.displayCaps.platformWidth;
var button = Ti.UI.createButton({title:'Click',width:100,height:50});
button.addEventListener('click', function(e) {
var detailContainerWindow = Ti.UI.createWindow({
title: 'View Details',
navBarHidden: false,
backgroundColor:'#fff'
});
detailContainerWindow.addEventListener('open', function(){
var anim1 = Ti.UI.createAnimation({
left: "-" + devWidth,
duration: 1000
});
detailContainerWindow.animate(anim1);
});
detailContainerWindow.open();
});
self.add(button);
No comments:
Post a Comment