【发布时间】:2013-12-06 09:38:28
【问题描述】:
我有一个错误,并且仅在 android 上: 我有这样的代码:
var selfWin;
var blackScreen;
var actInd;
var Login = require('ui/common/Login');
var myLogin;
var HomeView = require('ui/common/Home');
var homeView;
function ApplicationWindow() {
var selfWin = Ti.UI.createWindow({
backgroundColor:'#ffffff',
navBarHidden:true,
exitOnClose:true
});
blackScreen = Ti.UI.createLabel({
backgroundColor:'#000000',
opacity:0.40,
top:0,
height:'100%',
width:'100%',
zIndex:100
});
actInd = Ti.UI.createActivityIndicator({
width:50,
height:50,
zIndex:101
});
selfWin.add(blackScreen);
selfWin.add(actInd);
Ti.App.HideBlackScreen();
Ti.App.GoToFirstView();
return selfWin;
}
Ti.App.ShowBlackScreen = function ShowBlackScreen() {
blackScreen.show();
actInd.show();
};
Ti.App.HideBlackScreen = function HideBlackScreen() {
blackScreen.hide();
actInd.hide();
};
Ti.App.GoToFirstView = function GoToFirstView() {
myLogin = new Login();
selfWin.add(myLogin);
if (homeView) {
selfWin.remove(homeView);
}
};
Ti.App.GoToHome = function GoToHome() {
homeView = new HomeView();
selfWin.add(homeView);
selfWin.remove(myLogin);
};
//make constructor function the public component interface
module.exports = ApplicationWindow;
这个错误发生在 selfWin.add(myLogin);在 GoToFirstView() 函数中,并且仅在 android 上。 有人可以帮助我吗? 非常感谢
【问题讨论】:
标签: android function titanium undefined