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 is a demo to show how backgroundLeftCap and backgroundTopCap work on the Tianium platform by Appcelerator | |
//Paste this code in app.js (tested on iOS) | |
//Screenshot: http://screencast.com/t/txWQD3l2UBN | |
/////////////////////////////////////////////////////////////////////////////// | |
//Just modify these variables to see how backgroundLeftCap and topCap will work | |
var topCap = 20; | |
var leftCap = 35; | |
var originalImageSize = {height:100, width:100} |
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
/* | |
Recognized parameters: | |
imageListURL - string (URL to JSON array of image names, if not available, imageList will be used) | |
imageList - array (array of image names to be added to imageURL, not used if imageListURL present) | |
imageURL - string (base url of images) | |
defaultImage - string (preventDefaultImage set if not used) | |
scrollable - object (pass in your own scrollableView) | |
scrollProps - object (pass in your own scrollable properties) | |
Sample Usage: |
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 args = arguments[0] || {}; | |
var changeFontSize = null; | |
$.sectionTitle.text = args.title; | |
function setTitles(callback){ | |
if(args.criteria) { | |
var cLength = args.criteria.length; | |
for(var i=0; i<cLength; i++){ | |
var title = Ti.UI.createLabel({ |
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.currentWindow; | |
var alertDialog = Titanium.UI.createAlertDialog({ | |
title: 'System Message', | |
buttonNames: ['OK'] | |
}); | |
var data = [ | |
{title:"Refresh",color:'#000',height:50}, | |
{title:"Row 1",color:'#000',height:50}, |
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 container = Ti.UI.createView({ | |
height : Ti.UI.SIZE | |
}); | |
var dashboardTileHolder = Ti.UI.createView({ | |
top : 0, | |
layout : "vertical", | |
height : Ti.UI.SIZE | |
}); | |
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(); | |
var leftTileView = Ti.UI.createView({ | |
backgroundColor:"red", | |
height:(Math.random()*200), | |
width:"59%", | |
left:0 | |
}); | |
var tileContainer = 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
$.index.open(); | |
function tableClick(e){ | |
$.index.setActiveTab(e.rowData.tab); | |
} |
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(); | |
var slider = Ti.UI.createView({ | |
height:28, | |
width:358, | |
backgroundImage:'slider.png', | |
top:0 | |
}); | |
var button = 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
Ti.Geolocation.purpose = "Locate your current county"; | |
Ti.Geolocation.getCurrentPosition(function(e){ | |
if(Ti.Geolocation.locationServicesAuthorization != 2){ | |
var lat = e.coords.latitude; | |
var lng = e.coords.longitude; | |
getCounty({county:"County", url:"http://labs.silverbiology.com/countylookup/lookup.php?cmd=findCounty&DecimalLatitude="+lat+"&DecimalLongitude="+lng}); | |
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
Testing |
NewerOlder