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
Titanium = { | |
'userAgent' : '', | |
'version' : '', | |
addEventListener : function(name, callback) | |
{ | |
///<summary>add an event listener for the instance to receive view triggered events</summary> | |
///<param name="name" type="string">name of the event</param> | |
///<param name="callback" type="function">callback function to invoke when the event is fired</param> | |
///<return type="void"/> | |
return ; |
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
<!-- Make the 'android' element of your tiapp.xml look like this--> | |
<android xmlns:android="http://schemas.android.com/apk/res/android"> | |
<activities> | |
<activity url="Test.js" dummy="dummy"> | |
<intent-filter> | |
<action android:name="android.intent.action.MAIN" /> | |
</intent-filter> | |
</activity> | |
</activities> | |
</android> |
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"?> | |
<ti:app xmlns:ti="http://ti.appcelerator.org"> | |
<id>com.billdawson.keyboardhide</id> | |
<name>KeyboardHide</name> | |
<version>1.0</version> | |
<publisher>Bill Dawson</publisher> | |
<url>billdawson.com</url> | |
<description>No description provided</description> | |
<copyright>2010 by Bill Dawson</copyright> | |
<property type="bool" name="ti.android.debug">true</property> |
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
function dosubs(person, property, labels) { | |
if (!(person[property])) { | |
return; | |
} | |
var pset = person[property]; | |
for (var i = 0; i < labels.length; i++) { | |
var label = labels[i]; | |
if (!(pset[label])) { | |
continue; | |
} |
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
protected boolean keyChar(char arg0, int arg1, int arg2) | |
{ | |
int key = (int) arg0; | |
boolean suppress = false; | |
if (key == Keypad.KEY_ENTER) { | |
if (proxy.hasDynamicValue("suppressReturn")) { | |
suppress = TiConvert.toBoolean(proxy.getDynamicValue("suppressReturn")); | |
} | |
} | |
if (suppress) { |
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.currentWindow; | |
var view = Titanium.UI.createView({ | |
backgroundColor:'red', | |
width:200, | |
height:200, | |
top: 0, | |
left: 0 | |
}); |
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
<h2>Pre-Requisites</h2> | |
<h3>For iPhone/iPad App Development</h3> | |
<p>Get the latest iPhone SDK from Apple's <a href="http://developer.apple.com/iphone">iPhone | |
Dev Center</a>. The standard SDK download will include XCode and all the other development | |
tools that we require. Note: You need at least iPhone SDK 3.2 if you want to develop for | |
both the iPhone and the iPad. </p> | |
<h3>For Android App Development</h3> |
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
Java and I | |
========== | |
22 April 2010 | |
My only Java code running in production is a relatively small, | |
single-purpose servlet developed a few months ago. Professionally | |
speaking, my background is MS dev tools (I'm an MCSD.) As a | |
hobbyist, I've followed Java since picking up the first edition of | |
Eckel's "Thinking in Java" back in the day. I run Eclipse Galileo |
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
if platform.system() == 'Windows': | |
run.run([self.sdk.get_adb(), "start-server"], True, ignore_output=True) |
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
import os,subprocess,types,sys | |
def run(args,ignore_error=False,debug=True, ignore_output=False): | |
if debug: | |
print "[DEBUG] %s"%(" ".join(args)) | |
sys.stdout.flush() | |
if ignore_output: | |
subprocess.Popen(args, stderr=subprocess.PIPE, stdout=subprocess.PIPE).wait() | |
return None | |
(so,se) = subprocess.Popen(args, stderr=subprocess.PIPE, stdout=subprocess.PIPE).communicate() |