This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
| <?php | |
| $ua = strtolower($_SERVER['HTTP_USER_AGENT']); | |
| if(stripos($ua,'android') !== false) { // && stripos($ua,'mobile') !== false) { | |
| header('Location: https://MyAndroidAppURL'); | |
| exit(); | |
| } else if(strstr($_SERVER['HTTP_USER_AGENT'],'iPhone') || strstr($_SERVER['HTTP_USER_AGENT'],'iPod') || strstr($_SERVER['HTTP_USER_AGENT'],'iPad')) | |
| { | |
| header('Location: http://MyiTunesAppURL'); | |
| exit(); | |
| } else { |
This file contains hidden or 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 is a demo to show how backgroundLeftCap and backgroundTopCap work on the Tianium platform by Appcelerator | |
| //Paste this code in app.js (tested on iOS) | |
| //Screenshot: http://screencast.com/t/txWQD3l2UBN | |
| /////////////////////////////////////////////////////////////////////////////// | |
| //Just modify these variables to see how backgroundLeftCap and topCap will work | |
| var topCap = 20; | |
| var leftCap = 35; | |
| var originalImageSize = {height:100, width:100} |
This file contains hidden or 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 box = Ti.UI.createView({ | |
| backgroundColor:'blue', | |
| center:{x:50,y:50}, | |
| height:40, | |
| width:40 | |
| }); |
This file contains hidden or 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 pinImage = 'map-pin.png'; | |
| var selectedPinImage = 'map-pin-selected.png'; | |
| var pin1 = Titanium.Map.createAnnotation({ | |
| latitude:37.390749, | |
| longitude:-122.081651, | |
| title:"Appcelerator Headquarters", | |
| subtitle:'Mountain View, CA', |