Skip to content

Instantly share code, notes, and snippets.

View timoa's full-sized avatar
🚀
Trying to contribute to opensource everyday!

Damien Laureaux timoa

🚀
Trying to contribute to opensource everyday!
View GitHub Profile
@dawsontoth
dawsontoth / InfiniteScrollableView.js
Created February 3, 2011 20:54
Infinite scrollable list.
/**
* We're going to create an infinite scrollable list. In this case, we're going to show a date. When you swipe left,
* you'll see yesterday. Then the day before yesterday, and so on. Swiping right shows you tomorrow, and so on.
*/
var win = Ti.UI.createWindow({ backgroundColor: '#fff' });
var isAndroid = Ti.Platform.osname === 'android';
/**
* Track where we are in the infinite scrollable views, and define how large of a step goes between each view.
*/
var currentDate = new Date(), msIntervalBetweenViews = 1000/*ms*/ * 60/*s*/ * 60/*m*/ * 24/*h*/;
@jpurcell
jpurcell / pull-to-refresh(android).js
Created April 5, 2011 15:58
Tweetie-like pull to refresh and pull to load more. Note that it requries set heights for everything.
// 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({
@iskugor
iskugor / app.js
Created February 9, 2012 13:02
Remove all child elements in Titanium
function removeAllChildren(viewObject){
//copy array of child object references because view's "children" property is live collection of child object references
var children = viewObject.children.slice(0);
for (var i = 0; i < children.length; ++i) {
viewObject.remove(children[i]);
}
}
@bob-sims
bob-sims / 00-README.TXT
Last active October 1, 2015 09:47
Demo CommonJS module for Titanium Mobile interaction with Drupal Services 3.x REST + JSON interface
This is a simple CommonJS module to wrap Titanium Ti.Network.HttpClient calls to interact with Drupal Services.
NOTE: Code updated at @TiConf using callback functions.
Tested using:
Drupal 6.24
Services 3.1
Titanium Mobile SDK 1.8.2 (Android 2.2 SDK)
@egomez99
egomez99 / Tiapp.xml
Created March 16, 2012 16:30
hardwareAccelerated=true
<?xml version="1.0" encoding="UTF-8"?>
<ti:app xmlns:ti="http://ti.appcelerator.org">
<deployment-targets>
<target device="mobileweb">true</target>
<target device="iphone">true</target>
<target device="ipad">true</target>
<target device="android">true</target>
<target device="blackberry">false</target>
</deployment-targets>
<sdk-version>1.9.0.v20120213133135</sdk-version>
@Mode54
Mode54 / ActionBarView.js
Created July 22, 2012 16:00
Action Bar Module for Titanium Mobile
/*
* Android API Guide
* http://developer.android.com/guide/topics/ui/actionbar.html
* Android Design Guide
* http://developer.android.com/design/patterns/actionbar.html
* Titanium Mobile will support someday
* https://jira.appcelerator.org/browse/TIMOB-2371
*/
var osName = Ti.Platform.osname,
isAndroid = osName==='android',
@bob-sims
bob-sims / convertImages.sh
Created July 26, 2012 02:10
Automated Build of X-Platform Titanium Splash Screens and Icons
#! /bin/bash
# inspired by Greg McCormick's (@crushmedianet) post
# http://crushmedia.net/2012/04/23/automated-build-of-titanium-iconloading-files/
# updated 4 Aug 2012: creates clipped iPad backgrounds by cropping 768x1024, etc.
# create following base images + save in APPNAME/Resources/:
# appicon-android-512x512.png
@mschmulen
mschmulen / .gitignore
Created August 22, 2012 18:41
Titanium project .gitignore
/build
/modules
/.DS_Store
/.settings
/.project
.DS_Store*
/Resources/.DS_Store*
build.log
@stephenfeather
stephenfeather / parse.js
Last active March 1, 2022 12:06
Quick library for using the Parse REST API within Appcelerator's Titanium. Building it out as I need different pieces of the API.
// Copyright Stephen Feather and other contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
@bob-sims
bob-sims / entypo-map.js
Last active March 21, 2016 17:49
Entypo icon font UTF map as JSON
// parsed from https://github.com/danielbruce/entypo/blob/master/config.yml
[
{
"name": "note",
"code": "0x266a",
"search": [
"music",
"note",
"song"