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
/* | |
Custom logger | |
// usage | |
var console = require('/logger'); | |
console.log({sdf:"df"}, [1,3,5,6], "sdfsdf"); | |
*/ | |
exports.log = function() { | |
if(Ti.App.Properties.getBool('production')==false) { |
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'); | |
// create tab group | |
var tabGroup = Titanium.UI.createTabGroup(); | |
// | |
// create base UI tab and root window | |
// |
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
function createNotification() { | |
var mainIntent = Titanium.Android.createIntent({ | |
className: 'org.appcelerator.titanium.TiActivity', | |
packageName: 'com.appcelerator.foo' | |
}); | |
var pending = Titanium.Android.createPendingIntent({ | |
activity: Titanium.Android.currentActivity, | |
intent: mainIntent, |
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
// implement like this: | |
var window = Ti.UI.createWindow({ | |
backgroundColor:'#fff' | |
}); | |
// draw the gridlines first so your other elements stack on top of them | |
// without requiring you to set the z-index property of each | |
var grid = require('gridlines'); | |
grid.drawgrid(10,window); |
NewerOlder