Skip to content

Instantly share code, notes, and snippets.

// add all items to collection
Alloy.Collections.Fugitive.reset([{
"name" : "Jeff Haynie"
}, {
"name" : "Nolan Wright"
}, {
"name" : "Don Thorp"
}, {
"name" : "Marshall Culpepper"
}, {
var container = Ti.UI.createView({backgroundColor: "white", layout: "vertical"});
var layout = [
{
title: "Parent 1",
isparent: true,
opened: false,
sub: [
{
var win1 = Titanium.UI.createWindow({
title:'Tab 1',
backgroundColor:'#fff',
layout: 'vertical'
});
var bt1 = Ti.UI.createButton({title: 'send message (method 1)', top: 200});
bt1.addEventListener('click', function(e)
@saggy
saggy / app.js
Created June 25, 2013 16:24 — forked from viezel/app.js
// 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);
<?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"
Alloy.Globals.gc = function(ob, parent) {
if (ob.children) {
for (var c = (ob.children.length - 1); c >= 0; c--) {
Alloy.Globals.gc(ob.children[c], ob);
}
}
if (parent) {
parent.remove(ob);
ob = null;
}
Alloy.Globals.settings = {}; // Create Empty Object.
/* Settings Getter - Can also just access Alloy.Globals.settings[key] */
Alloy.Globals.settings.get = function(key) {
return Alloy.Globals.settings[key] || null;
}
/* Settings Saver */
Alloy.Globals.settings.set = function(key,value) {
var settings = Alloy.createCollection('settings');
Alloy.Globals.gc = function(ob, parent) {
if (ob.children) {
for (var c = (ob.children.length - 1); c >= 0; c--) {
Alloy.Globals.gc(ob.children[c], ob);
}
}
if (parent) {
parent.remove(ob);
ob = null;
}
/**
* 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({
// get the collection object
Alloy.Collections.instance("Fugitive");
// delete all items
Alloy.Collections.Fugitive.deleteAll();