Skip to content

Instantly share code, notes, and snippets.

@kwhinnery
Created July 19, 2010 05:29
Show Gist options
  • Save kwhinnery/481044 to your computer and use it in GitHub Desktop.
Save kwhinnery/481044 to your computer and use it in GitHub Desktop.
Titanium.UI.setBackgroundColor('#000');
//Main Tab Group
var tabGroup = Titanium.UI.createTabGroup();
//Photo Selection Window
var photosWindow = Titanium.UI.createWindow({
url:'photos.js',
title:'Photos',
backgroundColor:'#fff'
});
var photosTab = Titanium.UI.createTab({
icon:'43-film-roll.png',
title:'Photos',
window:photosWindow
});
//Configuration Window
var configWindow = Titanium.UI.createWindow({
url:'config.js',
title:'Configuration',
backgroundColor:'#fff'
});
var configTab = Titanium.UI.createTab({
icon:'19-gear.png',
title:'Configuration',
window:configWindow
});
//Add tabs and open tab group
tabGroup.addTab(photosTab);
tabGroup.addTab(configTab);
tabGroup.open();
var label1 = Titanium.UI.createLabel({
color:'#999',
text:'I am the config window',
font:{fontSize:20,fontFamily:'Helvetica Neue'},
textAlign:'center',
width:'auto'
});
Ti.UI.currentWindow.add(label1);
var label1 = Titanium.UI.createLabel({
color:'#999',
text:'I am the photo window',
font:{fontSize:20,fontFamily:'Helvetica Neue'},
textAlign:'center',
width:'auto'
});
Ti.UI.currentWindow.add(label1);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment