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:'#ccc' | |
| }); | |
| // create the table view | |
| var tableView = Ti.UI.createTableView({}); | |
| // create an empty array | |
| var data = []; | |
| // this is the alert message + deleting the row from the array | |
| function confirmDel(rowId,rowName) { |
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
| /*********************************************/ | |
| /* Prototypes that work against primitives */ | |
| /*********************************************/ | |
| String.prototype.trim = function() { return this.replace(/^\s+|\s+$/g, ''); }; | |
| String.prototype.contains = function(t) { return this.indexOf(t) >= 0 ? true : false; }; | |
| String.prototype.beginsWith = function(t, i) { if (i == false) { return (t == this.substring(0, t.length)); } else { return (t.toLowerCase() == this.substring(0, t.length).toLowerCase()); } }; | |
| String.prototype.endsWith = function(t, i) { if (i == false) { return (t == this.substring(this.length - t.length)); } else { return (t.toLowerCase() == this.substring(this.length - t.length).toLowerCase()); } }; | |
| Object.prototype.merge = (function (ob) {var o = this;var i = 0;for (var z in ob) {if (ob.hasOwnProperty(z)) {o[z] = ob[z];}}return o;}); | |
| /* Examples: |
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
| // Please note that this is a dirty solution. | |
| // It does work, but Appcelerator does not support it (adding things to the Ti namespace). | |
| // There is a very good chance that it will not be possible in future releases. | |
| var ui = {}; | |
| var labels = {}; | |
| Ti.include('ui.js'); | |
| Ti.include('labels.js'); |
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
| var win = Ti.UI.createWindow({ | |
| backgroundColor: 'white', | |
| top: 0, left: 0, right: 0, bottom: 0, | |
| layout: "vertical" | |
| }); | |
| var button = Ti.UI.createButton({ | |
| title: "click me" | |
| }); | |
| win.add(button); |
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
| //By David Keegan | |
| //InScopeApps.com | |
| //http://inscopeapps.com/demos/flipbook/ | |
| (function($){ | |
| $.fn.flipbook = function(options){ | |
| options = $.extend({ | |
| 'start': 0, //start frame | |
| 'end': 100, //end frame, must be greater then start | |
| 'step': 1, //number of frames to step over while animating |
NewerOlder