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 currentData = new Array(); | |
| var requestAgain = true; | |
| var xhr = Titanium.Network.createHTTPClient(); | |
| var returnedData; | |
| var timeDelay = (2 * 60 * 1000); // 2 mins * 60 seconds * 1000 milliseconds | |
| // Setup our event handlers | |
| xhr.onload = function() { | |
| // This gets first one receipt of the data | |
| returnedData = this.responseText; |
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 the Android version of the Tweetie-like pull to refresh table: | |
| // http://developer.appcelerator.com/blog/2010/05/how-to-create-a-tweetie-like-pull-to-refresh-table.html | |
| var win = Ti.UI.currentWindow; | |
| var alertDialog = Titanium.UI.createAlertDialog({ | |
| title: 'System Message', | |
| buttonNames: ['OK'] | |
| }); | |
| var scrollView = Ti.UI.createScrollView({ |
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 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({ | |
| backgroundImage:'/images/tabbar.png' | |
| }); | |
| // Component Creation |
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
| /** | |
| * @preserve | |
| * Titanium Cloud Module | |
| * | |
| * This module is used across three distinct platforms (iOS, Android, and Mobile Web), each with their own architectural | |
| * demands upon it. | |
| * | |
| * Appcelerator Titanium is Copyright (c) 2009-2010 by Appcelerator, Inc. | |
| * and licensed under the Apache Public License (version 2) | |
| */ |
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 isIndicatorOpen = false, | |
| view = Ti.UI.createView({ | |
| backgroundColor : "#000", | |
| borderRadius : 10, | |
| opacity : 0.8 | |
| }), | |
| // message | |
| message = Ti.UI.createLabel({ | |
| color : "#fff", | |
| width : "auto", |
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
| /** | |
| * @author Dario Marcelino | |
| */ | |
| var defaultHintTextColor = 'gray'; | |
| var filter = function (/*Object*/ source){ | |
| var newObj = {}; | |
| for(name in source){ |
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 sample lets you record and share video with Appcelerator Titanium on Android. | |
| * REQUIRES THE 1.6.0 RC OF TITANIUM MOBILE SDK | |
| * http://developer.appcelerator.com/blog/2011/02/release-candidate-for-titanium-mobile-1-6-0.html | |
| */ | |
| /** | |
| * First, create our UI. We'll have two buttons: record, and share. | |
| */ | |
| var win = Titanium.UI.createWindow({ |
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 UI setup | |
| */ | |
| var win = Ti.UI.createWindow({ | |
| backgroundColor:"white", | |
| layout:"vertical" | |
| }); | |
| var label = Ti.UI.createLabel({ | |
| text:"press the button to add an event", |
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 uiODataSimple = (function() { | |
| var API = {}; | |
| API.DataJS = require('ti.sap.odata'); | |
| API.collectionCache = null; | |
| API.useXMLNotJSON = true; | |
| API.dataType = API.useXMLNotJSON ? 'application/atom+xml' : 'application/json'; | |
| API.queryString = '=xml'; |
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 menuWidth = 200; | |
| var container = Ti.UI.createScrollView({ | |
| disableBounce: false, | |
| horizontalBounce: true, | |
| contentWidth: Ti.Platform.displayCaps.platformWidth + menuWidth |
OlderNewer