开发者

Why can't I create a basic window with Titanium?

My app.js file is:

// this sets the background color of the master UIView (when there are no windows/tab groups on it)
Titanium.UI.setBackgroundColor('#fff');

// create tab开发者_如何学JAVA group
//var tabGroup = Titanium.UI.createTabGroup();


//
// create base UI tab and root window
//
var win1 = Titanium.UI.createWindow({  
    title:'TAB 1',
    backgroundColor:'#f00'
});

win1.addEventListener('click',function()
        {
            // set background color back to white after tab group transition
            alert('#fff');
        });

and all that loads is the red "Powered by Titanium" screen. What am I doing wrong?


you need to open the window

win1.open();
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜