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
| if(!Ti.App.Properties.hasProperty('notificationCount')) { | |
| Ti.App.Properties.setInt('notificationCount', 0); | |
| } else { | |
| Ti.App.Properties.removeProperty('notificationCount'); | |
| var activity = Ti.Android.currentActivity; | |
| var intent = Ti.Android.createIntent({ | |
| action : Ti.Android.ACTION_MAIN, | |
| // you can use className or url to launch the app | |
| // className and packageName can be found by looking in the build folder |
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
| /* | |
| //Sample 1 | |
| var tableView = require('tv_layout2'); | |
| tableView().open(); | |
| */ | |
| /* | |
| //Sample 2 | |
| var data = []; |
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
| Stack Trace | |
| _________________________________ | |
| 0 CoreFoundation 0x31d642a3 __exceptionPreprocess + 163 | |
| 1 libobjc.A.dylib 0x399fe97f objc_exception_throw + 31 | |
| 2 CoreFoundation 0x31d641c5 -[NSException initWithCoder:] + 1 | |
| 3 UIKit 0x33bd489f -[UIViewController __supportedInterfaceOrientations] + 475 | |
| 4 UIKit 0x33bd46a9 -[UIViewController __withSupportedInterfaceOrientation:apply:] + 25 | |
| 5 UIKit 0x33c19a41 -[UIViewController _updateLastKnownInterfaceOrientationOnPresentionStack:] + 185 | |
| 6 UIKit 0x33c19aab -[UIViewController _updateLastKnownInterfaceOrientationOnPresentionStack:] + 291 | |
| 7 UIKit 0x33bdf061 -[UIWindow _updateInterfaceOrientationFromDeviceOrientation:] + 985 |
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
| // An Example app to show usage of the Crittercism APIs | |
| // this does not currently contain best practices for | |
| // Crittercism in conjunction with Titanium | |
| // | |
| // Updated 02-13-2013 | |
| Ti.API.info("Ti App: importing Crittercism..."); | |
| var crittercism = require('com.crittercism.ti'); | |
| Ti.API.info("module is => " + crittercism + "\n"); |
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({ | |
| height : Ti.UI.FILL, | |
| width : Ti.UI.FILL, | |
| backgroundColor : '#fff', | |
| windowSoftInputMode: (Ti.UI.Android) ? Ti.UI.Android.SOFT_INPUT_ADJUST_PAN : '' | |
| }); | |
| var tableView = Ti.UI.createTableView({ | |
| width : Ti.UI.FILL, | |
| height : Ti.UI.FILL, |
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 : 'white', | |
| layout : "vertical" | |
| }); | |
| function createRow(i) { | |
| var row = Ti.UI.createView({ | |
| height: 45, | |
| width: Ti.UI.SIZE, | |
| top: 0, left: 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
| Ti.API.info("@ win_test.js"); | |
| var win = Ti.UI.createWindow(); | |
| win.backgroundColor = "#b5aea5"; | |
| win.open(); | |
| var button = Ti.UI.createButton({ | |
| title: 'new window' | |
| }); | |
| button.addEventListener('click', function(e) { | |
| var subwin = Ti.UI.createWindow({url: 'main.js', navBarHidden: 'true'}); |
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({ | |
| layout : 'vertical', | |
| backgroundColor : "#b5aea5" | |
| }); | |
| //attempt to start an activity while Image is downloading | |
| var intent = Ti.Android.createIntent({ | |
| action : Ti.Android.ACTION_CALL, | |
| data : 'tel:0133' + 31361035 | |
| }); |
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 = Titanium.UI.createWindow({ | |
| title : 'Window', | |
| backgroundColor : '#fff', | |
| className : 'navBarColor', | |
| translucent : false | |
| }); | |
| var scrollingView = Ti.UI.createScrollView({ | |
| top : 0, | |
| left : 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
| // open a single window | |
| var win = Ti.UI.createWindow({ | |
| backgroundColor : 'white' | |
| }); | |
| var label = Ti.UI.createLabel(); | |
| win.add(label); | |
| win.open(); | |
| // TODO: write your module tests here | |
| var wifissid = require('org.appcelerator.wifissid'); |