This file contains hidden or 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 win1 = Titanium.UI.createWindow({ | |
backgroundColor:'#ccc', | |
exitOnClose:true, | |
title:'win1: Main Window' | |
}); | |
var label1 = Ti.UI.createLabel({ | |
top: 10, | |
backgroundColor:'black', | |
color:'white', | |
ellipsize:true, |
This file contains hidden or 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
//Fetch file, save to cache, and attach to the passed in item. | |
//imageUrl: http link to image | |
//file: Ti File | |
//item: a Ti.UI.ImageView | |
var fetchAndCache = function(imageUrl, file, item) { | |
var adxhr = Titanium.Network.createHTTPClient(); | |
adxhr.onload = function() { | |
file.write(this.responseData); | |
item.image = file.nativePath; |
This file contains hidden or 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({ | |
backgroundColor: "#ccc", | |
fullscreen: true, | |
modal: true | |
}); | |
//Create the button. We use backgroundImage so that we get | |
//the standard effect where the button get grey when tapped | |
var button = Titanium.UI.createButton({ | |
width: 40, |
This file contains hidden or 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 props = data.properties || {}; | |
var obj = Ti.UI.createWindow(props); |
This file contains hidden or 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
-(void)setScrollsToTop_:(id)value | |
{ | |
[[self tableView] setScrollsToTop:[TiUtils boolValue:value]]; | |
} |
This file contains hidden or 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
/* | |
Profiler - Code base from YUI 3.4.1 (build 4118) | |
Brought required pieces into one file, to run in context of Titanium | |
Licensed under the BSD License. | |
http://yuilibrary.com/license/ | |
*/ | |
(function(){ | |
//Begin Closure |
This file contains hidden or 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 table view data object | |
var win = Ti.UI.createWindow({ | |
backgroundColor: "#ccc" | |
}); | |
var data = []; | |
function addRow(text, detailtext){ | |
var textContainer = Ti.UI.createView({ |
This file contains hidden or 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('#ccc'); | |
var win = Ti.UI.createWindow({ | |
modal: false | |
}); | |
var cView = Ti.UI.createScrollView({ | |
layout:'horizontal', | |
height: 35, |
This file contains hidden or 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 UI = {}; | |
var W = {}; | |
var V = {}; | |
var AUTODETECT_NONE = Ti.UI.iOS.AUTODETECT_NONE; | |
var AUTODETECT_ALL = Ti.UI.iOS.AUTODETECT_ALL; | |
var AUTODETECT_PHONE = Ti.UI.iOS.AUTODETECT_PHONE; | |
var AUTODETECT_LINK = Ti.UI.iOS.AUTODETECT_LINK; | |
var AUTODETECT_ADDRESS = Ti.UI.iOS.AUTODETECT_ADDRESS; | |
var AUTODETECT_CALENDAR = Ti.UI.iOS.AUTODETECT_CALENDAR; |
This file contains hidden or 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
function writeBase64Asset($path, $data) { | |
return file_put_contents($path, base64_decode($data)); | |
} |