Skip to content

Instantly share code, notes, and snippets.

@hansemannn
Created July 5, 2017 22:14
Show Gist options
  • Save hansemannn/8a6120efe3cf5f591152c8eded975fcb to your computer and use it in GitHub Desktop.
Save hansemannn/8a6120efe3cf5f591152c8eded975fcb to your computer and use it in GitHub Desktop.
var isTranslucent = true;
Ti.UI.setBackgroundColor('red');
var tabGroup = Ti.UI.createTabGroup({tabsTranslucent: isTranslucent});
tabGroup.addTab(createTab("Tab 1", "I am Window 1", "assets/images/tab1.png"));
tabGroup.open();
function createTab(title, message, icon) {
var win = Ti.UI.createWindow({
title: title,
backgroundColor: '#000'
});
var button = Ti.UI.createButton({
title: 'Toogle'
});
button.addEventListener('click', function() {
isTranslucent = !isTranslucent;
tabGroup.tabsTranslucent = isTranslucent;
});
win.add(button);
var tab = Ti.UI.createTab({
title: title,
window: win
});
return tab;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment