This file contains 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' | |
}); | |
win.open(); | |
var button = Ti.UI.createButton({ | |
title : "Click me!", | |
height : 50, | |
width : 200, | |
top : 100 |
This file contains 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
// I was unhappy about there was close to no control over the "pageControl" | |
// in scrollableViews, so I hacked my own | |
// ----- | |
var pages = []; | |
var page; | |
var numberOfPages = 0; | |
// Configuration | |
var pageColor = "#c99ed5"; |
This file contains 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
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="com.adriatic.test" android:versionCode="1" | |
android:versionName="1"> | |
<uses-sdk android:minSdkVersion="11" /> | |
<!-- TI_MANIFEST --> | |
<application android:icon="@drawable/appicon" | |
android:label="Test Application" android:name="TestApplication" |
This file contains 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
// put now.js and socket.io.js inside a 'lib' dir inside Resources dir | |
// (obviously you can change this, only remember to change the require inside now.js line #1) | |
// just socket.io: | |
/* | |
var io = require('/lib/socket.io'); | |
var socket = io.connect('http://192.168.1.129:6120'); // using LAN IP instead of localhost | |
socket.on('news', function (data) { | |
Ti.API.log(data); | |
socket.emit('my other event', { my: 'data' }); |
This file contains 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
// | |
// Regular Expression for URL validation | |
// | |
// Author: Diego Perini | |
// Updated: 2010/12/05 | |
// | |
// the regular expression composed & commented | |
// could be easily tweaked for RFC compliance, | |
// it was expressly modified to fit & satisfy | |
// these test for an URL shortener: |
This file contains 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 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 Titanium Mobile | |
* Copyright (c) 2009-2012 by Appcelerator, Inc. All Rights Reserved. | |
* Licensed under the terms of the Apache Public License | |
* Please see the LICENSE included with this distribution for details. | |
* | |
* WARNING: This is generated code. Modify at your own risk and without support. | |
*/ | |
#ifdef USE_TI_UITEXTAREA |
This file contains 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.include('overrideTabs.js'); | |
/* | |
This is a typical new project -- a tab group with three tabs. | |
*/ | |
var tabGroup = Ti.UI.createTabGroup(); | |
/* | |
Tab 1. |
This file contains 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
/* | |
* Mixin properties of n objects into the given object - pass in as many objects to mix in as you like. | |
* Can perform a shallow or deep copy (shallow is default for performance reasons). | |
* | |
* Usage: | |
* mixin([Boolean deepCopy,] objectToExtend, objectToMixIn [, as many other objects as needed]) | |
* | |
* Examples: | |
* | |
* var o1 = { |
This file contains 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
// **************************************************************************************************************** | |
// **************************************************************************************************************** | |
// test value can be 'raw' | 'socket.io' | 'nowjs' | |
var test = 'raw', | |
// **************************************************************************************************************** | |
// **************************************************************************************************************** | |
// REMEMBER to change this with your data |
OlderNewer