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
<?xml version="1.0" encoding="UTF-8"?> | |
<resources> | |
<string name="welcome">¡Hola</string> | |
<string name="format_test">Mi nombre es %s</string> | |
</resources> |
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
alert(L("welcome")); | |
alert(Ti.Locale.getString("welcome")); |
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 message = String.format(L("format_test"),"Jeff"); |
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
/** | |
* Simple demo for adding swipe detection on a table view row. Since the row is simply a container | |
* of views, you'll want to generally create a hidden view the size of the row and add your swipe listener | |
* to this view for detection. We need to improve Titanium so you don't have to do this in the future... | |
*/ | |
var win = Ti.UI.createWindow(); | |
var data = []; | |
for (var c=0;c<10;c++) | |
{ |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# | |
# Check the prerequisites for iPhone development | |
# | |
import os, sys, subprocess, re, types | |
import json, run, tempfile, codecs | |
template_dir = os.path.abspath(os.path.dirname(sys._getframe(0).f_code.co_filename)) |
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
package { | |
import Titanium.API; | |
import Titanium.UI; | |
/** | |
* Simple Titanium application written in ActionScript 3 | |
*/ | |
public class App | |
{ |
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
package Titanium | |
{ | |
package UI | |
{ | |
public class Window extends View | |
{ | |
public native function open ( params : Object = undefined ) : void; | |
} | |
} |
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
// make the contents of the window nav bar translucent like the iPhone app | |
var win = Titanium.UI.createWindow({barColor:"transparent",translucent:true}); | |
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 an example of use. | |
// Here we use the new Bearer Token thats make it possible to get tweets without user login | |
// More info on Bearer here: https://dev.twitter.com/docs/auth/application-only-auth | |
// Full Codebird API is here: https://github.com/mynetx/codebird-js | |
var Codebird = require("codebird"); | |
var cb = new Codebird(); | |
cb.setConsumerKey('CONSUMER_KEY', 'CONSUMER_SECRET_KEY'); | |
var bearerToken = Ti.App.Properties.getString('TwitterBearerToken', null); |
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 sprintf = require('util').format, | |
timer; | |
function play(arr, interval) { | |
var len = arr.length | |
, interval = interval || 100 | |
, i = 0; | |
timer = setInterval(function(){ | |
var str = arr[i++ % len]; |