Skip to content

Instantly share code, notes, and snippets.

@stereoket
Created March 17, 2011 17:01
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 stereoket/874696 to your computer and use it in GitHub Desktop.
Save stereoket/874696 to your computer and use it in GitHub Desktop.
tabgroup titanium buggy example
// Create intial Window Group for use in the tab groups
var win1 = Ti.UI.createWindow({title: 'Page1', titleid: 'page1', backgroundColor: '#fff'});
var win2 = Ti.UI.createWindow({title: 'Page2', titleid: 'page2', backgroundColor: '#fff'});
// Create New tab group before adding individual tabs
var tabGroup1 = Ti.UI.createTabGroup({id: 'firstTabGroup', bottom: 0,height: 40, barColor: 'green'});
// Create the individual tabs with titles and icons
var tab1 = Ti.UI.createTab({
window:win1,
id:'page1',
icon:'images/tabgroups/83-calendar.png',
title:"Page1"
});
var tab2 = Ti.UI.createTab({
window:win2,
id:'page2',
icon:'images/tabgroups/103-map.png',
title:"Page2"
});
tabGroup1.addTab(tab1);
tabGroup1.addTab(tab2);
tabGroup1.setActiveTab(1);
tabGroup1.open();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment