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 text = Ti.UI.createTextArea({ | |
value:'Event: Jan 25, 2012 at 5:00pm', | |
autoLink: Ti.UI.iOS.AUTODETECT_CALENDAR, | |
top:100, | |
enabled:false, | |
font:{fontSize:16} | |
}); | |
var win = Ti.UI.createWindow({backgroundColor:'#fff'}); |
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 win = Ti.UI.createWindow(); | |
var container = Ti.UI.createView({ | |
height:260, | |
width:30 | |
}) | |
var slider = Ti.UI.createView({ | |
height:200, | |
width:20, |
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 win = Ti.UI.createWindow(); | |
var switchContainer = Ti.UI.createView({ | |
width:100, | |
height:40, | |
borderRadius:10, | |
backgroundColor:'gray' | |
}); | |
var switchLabelYes = Ti.UI.createLabel({ |
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
/* | |
Recognized parameters: | |
imageListURL - string (URL to JSON array of image names, if not available, imageList will be used) | |
imageList - array (array of image names to be added to imageURL, not used if imageListURL present) | |
imageURL - string (base url of images) | |
defaultImage - string (preventDefaultImage set if not used) | |
scrollable - object (pass in your own scrollableView) | |
scrollProps - object (pass in your own scrollable properties) | |
Sample Usage: |
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 intent = Ti.Android.createServiceIntent({url: 'notification.js'}); | |
Ti.Android.stopService(intent); | |
////*notification.js*//////// | |
Titanium.Android.NotificationManager.notify( | |
0, // <-- this is an ID that we can use to clear the notification later | |
Ti.Android.createNotification({ | |
//contentView: customView, |
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 lImageView = Ti.UI.createScrollView({ | |
height:labelSize.height, | |
width:labelSize.width, | |
contentHeight:'auto', | |
contentWidth:'auto', | |
minZoomScale:0.05, | |
maxZoomScale:5.0, | |
zoomScale:1.0 | |
}); |
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 win = Ti.UI.createWindow(); | |
win.open(); | |
function label(args){ | |
var view = Ti.UI.createView({ | |
width:'size', | |
height:'size', | |
layout:'vertical' | |
}); |
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 win = Ti.UI.createWindow({ | |
backgroundColor: '#333' | |
}); | |
var menu = Ti.UI.createView({ | |
backgroundColor:'blue', | |
top:Ti.Platform.displayCaps.platformHeight-50, | |
bottom:0 | |
}); |
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 win = Ti.UI.createWindow(); | |
var mainView = Ti.UI.createView(); | |
var parent1 = Ti.UI.createView({top:0, bottom:0, backgroundColor:'blue'}); | |
var parent1Child1 = Ti.UI.createView({top:50, bottom:0, backgroundColor:'green'}); | |
parent1.add(parent1Child1); |
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 win = Ti.UI.createWindow({backgroundColor:'#000'}); | |
var dialog = Titanium.UI.createOptionDialog({ | |
options: ['Camera','Gallery', 'Cancel'], | |
cancel:2 | |
}); | |
dialog.show(); |