嗨,我正在通过 TCAD 实验室并尝试实现它们,但选项菜单不起作用我什至从他们的门户网站下载了代码,即使该代码不起作用。我的代码是
var self = Titanium.UI.createWindow({
backgroundColor : 'transparent',
backgroundImage : 'images/grain.png',
title : (_captured) ? L('captured') : L('fugitives'),
barColor : '#6d0a0c',
activity : {
onCreateOptionsMenu : function(e) {
var menu = e.menu;
var m1 = menu.add({
title : L('add')
});
m1.addEventListener('click', function(e) {
//open in tab group to get free title bar (android)
self.containingTab.open(new AddWindow);
});
}
}
});