Skip to content

Instantly share code, notes, and snippets.

View srahim's full-sized avatar

Sabil Rahim srahim

  • Appcelerator
  • Mountain View, CA
View GitHub Profile
@srahim
srahim / gist:2698175
Created May 14, 2012 23:57
ScrollableView.yml
- name: overlayEnabled
summary: |
Determines whether the paging control is added as an overlay to the scrollable view.
description: |
If this property is set, the scrollable view will take up the entire height available in the
current view and the paging control will be place over the scrollable view. It is advicable
to set appropriate value for [pagingControlAlpha](Titanium.UI.ScrollableView.pagingControlAlpha)
along with this property, so that the underlaying scrollable view content can be seen properly.
type: Boolean
default: false
@srahim
srahim / app.js
Created August 7, 2012 23:03
TextField Test case
var win = Ti.UI.createWindow();
var l = Titanium.UI.createLabel({
text:'Text area tests.',
font:{fontSize:14},
left:10,
top:10,
width:300,
height:'auto'
@srahim
srahim / app.js
Created August 14, 2012 17:23
trackSignificantLocationChanges.
var win = Titanium.UI.createWindow({
backgroundColor:'grey'
});
Ti.Geolocation.preferredProvider = "gps";
Ti.Geolocation.purpose = "GPS demo";
Ti.Geolocation.trackSignificantLocationChange = true;
@srahim
srahim / app.js
Created September 11, 2012 18:05
gallery
// exports.viewItemDetails = function(data){
//Parent Window
var win = Titanium.UI.createWindow({
title:'Client',
backgroundColor:'#fff',
layout: 'vertical'
});
var images = [];
#!/bin/bash
process="driver.js --mode=remote --platform=ios"
driver_timeout=$((20 * 60))
# move back to the actual driver directory - this is important since the driver depends on relative pathing
cd ..
while [ true ]
do
driver_pid=`ps aux | grep -v grep | grep "$process" | awk '{ print $2 }'`
@srahim
srahim / app.js
Created December 5, 2012 02:03
timob-11864
var win1 = Titanium.UI.createWindow({
title:'Test',
backgroundColor:'#fff'
});
var label = Ti.UI.createLabel({
top: 30,
width:100,
height:30,
@srahim
srahim / app.js
Created December 5, 2012 02:04
timob-11864
var win1 = Titanium.UI.createWindow({
title:'Test',
backgroundColor:'#fff'
});
var label = Ti.UI.createLabel({
top: 30,
width:100,
height:30,
itanium Command-Line Interface, CLI version 3.0.22, Titanium SDK version 3.1.0.ae81248
Copyright (c) 2012, Appcelerator, Inc. All Rights Reserved.
Please report bugs to http://jira.appcelerator.org/
[DEBUG] :  No project level plugins to load
[DEBUG] :  Loaded plugin hooks:
[DEBUG] :  /Users/qetest/Library/Application Support/Titanium/mobilesdk/osx/3.1.0.ae81248/cli/hooks/plugins.js
[DEBUG] :  /Users/qetest/Library/Application Support/Titanium/mobilesdk/osx/3.1.0.ae81248/iphone/cli/hooks/install.js
[DEBUG] :  /Users/qetest/Library/Application Support/Titanium/mobilesdk/osx/3.1.0.ae81248/iphone/cli/hooks/package.js
[DEBUG] :  /Users/qetest/Library/Application Support/Titanium/mobilesdk/osx/3.1.0.ae81248/iphone/cli/hooks/run.js
[INFO] :  Build type: test
v20130114105803
@srahim
srahim / gist:5021825
Last active December 14, 2015 03:29
ti.app.properties
var props = Titanium.App.Properties.listProperties();
Ti.API.info("Number of properties set: "+props.length);
for (var c=0;c<props.length;c++)
{
var value = Titanium.App.Properties.getString(props[c]);
Titanium.API.info(props[c]+" = "+value);
}