Skip to content

Instantly share code, notes, and snippets.

@reyjexter
Created January 16, 2013 01:45
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 reyjexter/4543904 to your computer and use it in GitHub Desktop.
Save reyjexter/4543904 to your computer and use it in GitHub Desktop.
var tabGroup = Titanium.UI.createTabGroup({id:'tabGroup1'});
var win1 = Titanium.UI.createWindow({backgroundColor: '#ffffff'});
win1.addEventListener('android:back', function() {
alert("android:back event firing from win1");
});
var tab1 = Titanium.UI.createTab({
id:'tab1',
title: "Tab 1",
window:win1
});
var win2 = Titanium.UI.createWindow({backgroundColor: '#6699cc'});
win2.addEventListener('android:back', function() {
alert("android:back event firing from win2");
});
var tab2 = Titanium.UI.createTab({
icon:'images/tabs/KS_nav_ui.png',
title: "Tab 2",
window:win2
});
tabGroup.addTab(tab1);
tabGroup.addTab(tab2);
tabGroup.open();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment