将视图添加到视图只会崩溃Android应用程序

时间:2011-06-06 15:08:08

标签: javascript view appcelerator

我正在使用Kevin Whinnery的Snapost应用程序(https://github.com/kwhinnery/Snapost/blob/master/1.1.x/Snapost/Resources/app.js),但是在添加视图时查看应用程序只是崩溃。

这是我在应用程序中唯一的代码。

Titanium.UI.setBackgroundColor('#FFF'); 

var viewContainer = Titanium.UI.createView({
    top:0,
    width:320,
    height:420 
});

var home = Titanium.UI.createView({
      top:0,
      width:320,
      height:420,
});

viewContainer.add(home);

var app = Ti.UI.createWindow({
    title:"main window"
});    
app.add(viewContainer);
app.open();

1 个答案:

答案 0 :(得分:0)

似乎是API 1.6的问题,它在API 2.2上运行良好。

相关问题