This file contains 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 sets the background color of the master UIView (when there are no windows/tab groups on it) | |
Titanium.UI.setBackgroundColor('#000'); | |
var win = Ti.UI.createWindow({ | |
title: "MainWindow", | |
layout: "vertical" | |
}); | |
var username = Ti.UI.createTextField({ | |
left: 10, |
This file contains 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
/* | |
* Create Your Window | |
*/ | |
var win = Ti.UI.createWindow({ | |
title: 'MainWin', | |
backgroundColor: '#a6a6a6' | |
}); | |
/* |
This file contains 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
$U = {}; | |
$U.deviceType = (Ti.Platform.osname === 'ipad') ? 'tablet' : 'phone'; | |
var SliderTabGroupButton = function(_args) { | |
_args = _args || {}; | |
var borderLeft, borderRight, label; | |
var API = Ti.UI.createView({ |
This file contains 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 win = Ti.UI.createWindow({layout: 'vertical', backgroundColor:'#fff'}); | |
var textField = Ti.UI.createTextField({ | |
height: Ti.UI.SIZE, | |
width: '90%', | |
font: {fontSize: 20}, | |
softKeyboardOnFocus: Ti.UI.Android.SOFT_KEYBOARD_SHOW_ON_FOCUS | |
}); |
This file contains 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 win = Ti.UI.createWindow({layout: 'vertical', backgroundColor:'#fff'}); | |
var data = []; | |
for(var i=0; i<20; i++){ | |
var row = Ti.UI.createTableViewRow({ | |
height: 40, | |
width: Ti.UI.FILL | |
}); | |
row.title = 'Item '+i; |
This file contains 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 win = Ti.UI.createWindow({layout: 'vertical', backgroundColor:'#fff'}); | |
var textField = Ti.UI.createTextField({ | |
height: Ti.UI.SIZE, | |
width: '90%', | |
font: {fontSize: 20}, | |
softKeyboardOnFocus: Ti.UI.Android.SOFT_KEYBOARD_SHOW_ON_FOCUS | |
}); | |
win.add(textField); |
This file contains 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
//Shortcuts | |
var $P = Ti.App.Properties; | |
var $F = Ti.Filesystem; | |
// PLATFORM RELATED Functions | |
exports.osname = Ti.Platform.osname; | |
exports.iOS = function() { return (Ti.Platform.osname === 'ipad' || Ti.Platform.osname ==='iphone')}; | |
exports.android = function() { return Ti.Platform.osname === 'android' } |
This file contains 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
/** | |
* Dependencies | |
*/ | |
var ACS = require('ti.cloud'); | |
/** | |
* CloudImage Definition | |
*/ | |
var CloudImage = function(_args) { |
This file contains 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 Cloud = require('ti.cloud'); | |
Cloud.debug = true; | |
Cloud.PushNotifications.notify({ | |
channel: 'car-checkout', | |
payload: {alert:'Pending Car Checkout Request', badge:1, car_id: e.rowData.car_id}, // car_id is custom prop | |
to_ids: '123456,78910' | |
}, function (e) { | |
if (e.success) { | |
alert('Your Request has been sent'); |
This file contains 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
//Shortcuts | |
var $P = Ti.App.Properties; | |
var $F = Ti.Filesystem; | |
// PLATFORM RELATED Functions | |
exports.osname = Ti.Platform.osname; | |
exports.iOS = function() { return (Ti.Platform.osname === 'ipad' || Ti.Platform.osname ==='iphone')}; | |
exports.android = function() { return Ti.Platform.osname === 'android' } |
OlderNewer