Skip to content

Instantly share code, notes, and snippets.

@evanmcd
Created March 10, 2011 21:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save evanmcd/864926 to your computer and use it in GitHub Desktop.
Save evanmcd/864926 to your computer and use it in GitHub Desktop.
/*******************************/
/* app.js
*/
/*******************************/
// this sets the background color of the master UIView (when there are no windows/tab groups on it)
Titanium.UI.setBackgroundColor('#000');
var baseWin = Titanium.UI.createWindow({
backgroundColor:'red',
url:'base.js',
width:1024,
height:768,
top:0,
left:0
});
baseWin.orientationModes = [
Titanium.UI.LANDSCAPE_LEFT,
Titanium.UI.LANDSCAPE_RIGHT
];
baseWin.open();
/*******************************/
/* contentWin1.js
*/
/*******************************/
var win = Titanium.UI.currentWindow;
var lbl = Titanium.UI.createLabel({
color:'#FFF',
text:'contentWin1',
width:'auto'
});
win.add(lbl);
/*******************************/
/* contentWin2.js
*/
/*******************************/
var win = Titanium.UI.currentWindow;
var lbl = Titanium.UI.createLabel({
color:'#FFF',
text:'contentWin2',
width:'auto'
});
win.add(lbl);
/*******************************/
/* menu.js
*/
/*******************************/
var win = Titanium.UI.currentWindow;
var lbl = Titanium.UI.createLabel({
color:'#FFF',
text:'Menu'
});
win.add(lbl);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment