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();
精彩评论