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
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
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
| // The contents of this file will be executed before any of | |
| // your view controllers are ever executed, including the index. | |
| // You have access to all functionality on the `Alloy` namespace. | |
| // | |
| // This is a great place to do any initialization for your app | |
| // or create any global variables/functions that you'd like to | |
| // make available throughout your app. You can easily make things | |
| // accessible globally by attaching them to the `Alloy.Globals` | |
| // object. For example: | |
| // |
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
| <!DOCTYPE HTML> | |
| <!--html manifest="cache.manifest"--> | |
| <html> | |
| <head> | |
| <meta name="viewport" content="width=device-width"> | |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
| <title>Highstock Example</title> | |
| <script src="jquery.min.js"></script> | |
| <script src="highcharts.js"></script> | |
| <script src="exporting.js"></script> |
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 Cloud = require('ti.cloud'); | |
| function createUserACS(u,p,o){ | |
| Ti.API.info("ACS: createUserACS(), u = "+u+", p="+p); | |
| if(Titanium.Network.networkType == Titanium.Network.NETWORK_NONE){ | |
| alert("No Network. Please try again later."); | |
| return; | |
| } | |
| //Alloy.Globals.waitCursorStart(); |
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
| ".container": { | |
| backgroundColor:"white", | |
| fullscreen: true | |
| }, | |
| "Label": { | |
| width: Ti.UI.SIZE, | |
| height: Ti.UI.SIZE, | |
| color: "#000" | |
| }, | |
| "TextField": { |
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
| { | |
| "routes": [ { | |
| "path": "/", | |
| "callback": "application#index" | |
| }, { | |
| "path": "/getMovies", | |
| "method": "get", | |
| "callback": "services#getMovies" | |
| } ], | |
| "filters": [ { |
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
| { | |
| "routes": [ { | |
| "path": "/", | |
| "callback": "application#index" | |
| }, { | |
| "path": "/getData", | |
| "method": "post", | |
| "callback": "services#getData" | |
| } ], | |
| "filters": [ { |
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
| Appcelerator Autocomplete Search | |
| A server side search for customers, accounts, inventory, products, etc… in a mobile application is a very common operation. A typical UI for this operation is to allow the user to enter the search text and press a search button or the enter key on the on screen keyboard, as shown below. Then a search is performed, perhaps via a web service call to a server search API, and the retrieved results are displayed in a list for the user to select from the search results, as shown: | |
| This is accomplished in Titanium by adding a event listener on the search TextField and listen for the return event as follows: |
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
| Example of implementing search history synced across a user's multiple devices (like google maps) | |
| See blog post here: | |
| http://www.appcelerator.com/blog/2014/08/implementing-recent-history-in-your-appcelerator-apps/ | |
| Excerpt from Blog: | |
| Implementing Recent Search History in your Appcelerator apps |
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
| Basic Titanium Push Demo for iOS and Android | |
| If you pass a URL in the push json payload in the htmlLink field, then the client will display the URL in a webview. This is Rich Push |