Created
May 23, 2011 20:29
-
-
Save benbahrenburg/987529 to your computer and use it in GitHub Desktop.
Ti.App issues
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
// this sets the background color of the master UIView (when there are no windows/tab groups on it) | |
Titanium.UI.setBackgroundColor('#000'); | |
var tzt ={ | |
testIt: function(){ | |
alert('testIt'); | |
}, | |
isAndroid : function(){ | |
return (Ti.Platform.osname == 'android'); | |
}, | |
widthCalc : function(){ | |
return (Ti.Platform.displayCaps.platformWidth>320) ? 320 : Ti.Platform.displayCaps.platformWidth; | |
} | |
}; | |
Ti.App.tzt=tzt; | |
var tabGroup = Ti.UI.createTabGroup(); | |
var wMain = Ti.UI.createWindow({ | |
title:'Test', | |
backgroundColor:'#fff', | |
barColor:'#a32020', | |
tabBarHidden:true, | |
url:'page1.js' | |
}); | |
var tab1 = Ti.UI.createTab({window:wMain}); | |
tabGroup.addTab(tab1); | |
// open tab group | |
tabGroup.open(); |
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 demo = {win : Ti.UI.currentWindow}; | |
(function(){ | |
alert(Ti.App.tzt.widthCalc()); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment