【问题标题】:Why can't I create a basic window with Titanium?为什么我不能用 Titanium 创建一个基本窗口?
【发布时间】:2011-08-15 02:16:51
【问题描述】:

我的app.js 文件是:

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

// create tab 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');
        });

加载的只是红色的“Powered by Titanium”屏幕。我做错了什么?

【问题讨论】:

    标签: android ios titanium titanium-mobile


    【解决方案1】:

    你需要打开窗口

    win1.open();
    

    【讨论】:

      猜你喜欢
      • 2020-09-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-11-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多