Skip to content

Instantly share code, notes, and snippets.

@rborn
rborn / README.md
Last active August 29, 2015 14:23 — forked from manumaticx/README.md

Fading Actionbar

This is a quick example of how to create a fading actionbar effect like this in Appcelerator Titanium

fadingactionbar

How this works

This is actually very simple. The trick is putting the Actionbar in overlay mode by configuring the theme with windowActionBarOverlay:true. Then all you need to do is updating the color of the Actionbar, in this case by scrolling a ScrollView.

@rborn
rborn / floatsign.sh
Last active August 29, 2015 14:19 — forked from Weptun/floatsign.sh
# !/bin/bash
# Copyright (c) 2011 Float Mobile Learning
# http://www.floatlearning.com/
# Extension Copyright (c) 2013 Weptun Gmbh
# http://www.weptun.de
#
# Extended by Ronan O Ciosoig January 2012
#
# Extended by Patrick Blitz, April 2013
@rborn
rborn / parse.js
Last active August 29, 2015 14:18
/*jslint vars: true, sloppy: true, nomen: true, maxerr: 1000 */
// This is a parse rest client for Titanium.
//
var config = {
parse: {
appID: 'foo',
clientKey: 'bar',
apiKey: 'baz',
var Alloy = require('alloy');
var isIOS8Plus = (OS_IOS && parseInt(Ti.Platform.version.split(".")[0]) >= 8);
var Parse;
if (OS_ANDROID) {
Parse = require('eu.rebelcorp.parse');
}
if (OS_IOS) {
Parse = require('parse');
var Alloy = require('alloy');
var isIOS8Plus = (OS_IOS && parseInt(Ti.Platform.version.split(".")[0]) >= 8);
var Parse;
if (OS_ANDROID) {
Parse = require('eu.rebelcorp.parse');
}
if (OS_IOS) {
Parse = require('parse');
var fadeIntro = Titanium.UI.createAnimation();
fadeIntro.opacity = 1.0;
fadeIntro.duration = 250;
var fadeOutro = Titanium.UI.createAnimation();
fadeOutro.opacity = 0.0;
fadeOutro.duration = 250;
@rborn
rborn / alloy.js
Last active August 29, 2015 14:17 — forked from iotashan/alloy.js
if (OS_ANDROID) {
// Somehow, only in alloy.js we can get the data (URL) that opened the app
Alloy.Globals.url = Ti.Android.currentActivity.intent.data;
Ti.API.info('launch data: '+Ti.Android.currentActivity.intent.data);
Ti.Android.currentActivity.addEventListener('newintent',function(e){
Ti.API.info('newintent ' + JSON.stringify(e.intent.data));
});
Ti.Android.currentActivity.onCreate = function(e){
//from line 502
-(void)setRightNavButton:(id)proxy withObject:(id)properties
{
ENSURE_UI_THREAD_WITH_OBJ(setRightNavButton,proxy,properties);
if (properties == nil) {
properties = [self valueForKey:@"rightNavSettings"];
}
else {
[self setValue:properties forKey:@"rightNavSettings"];
exports.definition = {
config : {
adapter : {
type : "restapi",
collection_name : ""
}
},
extendModel : function(Model) {
_.extend(Model.prototype, {
module.exports = function(grunt) {
require('time-grunt')(grunt);
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
CHANGELOG: '',
// add tiapp.xml changes to the repo
gitadd: {
versionBump: {
options: {