Created
July 5, 2017 22:14
-
-
Save hansemannn/8a6120efe3cf5f591152c8eded975fcb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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