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 |
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(); | |
win.open(); | |
var latitude = 37; | |
var longitude = -122; | |
var pinImage = 'map-pin.png'; | |
var selectedPinImage = 'map-pin-selected.png'; | |
var selectedPin = null; | |
var contentView = 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
/*This is a simple module that requires a map, an annotation and a parent view and will return the X & Y coordinates o fthe parent view of the provided annotation based on its latitude and longitude. | |
* | |
* PARAMS: | |
* -annotation {Ti.Map.Annotaion object}: The annotation you want to return the coordinates for | |
* -map {Ti.Map.View object}: The map with that contains the annotation | |
* -view {Ti.UI.View object}: The view in which you want the x/y coordinates | |
* -callback{function}: Use a callback or just return the point value if callback is null | |
* | |
* Full example here: https://gist.github.com/alanleard/4759405 | |
*/ |
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 pinImage = 'map-pin.png'; | |
var selectedPinImage = 'map-pin-selected.png'; | |
var pin1 = Titanium.Map.createAnnotation({ | |
latitude:37.390749, | |
longitude:-122.081651, | |
title:"Appcelerator Headquarters", | |
subtitle:'Mountain View, CA', |
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({ | |
backgroundColor: '#333' | |
}); | |
var box = Ti.UI.createView({ | |
backgroundColor:'blue', | |
center:{x:50,y:50}, | |
height:40, | |
width:40 | |
}); |
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
<?php | |
$ua = strtolower($_SERVER['HTTP_USER_AGENT']); | |
if(stripos($ua,'android') !== false) { // && stripos($ua,'mobile') !== false) { | |
header('Location: https://MyAndroidAppURL'); | |
exit(); | |
} else if(strstr($_SERVER['HTTP_USER_AGENT'],'iPhone') || strstr($_SERVER['HTTP_USER_AGENT'],'iPod') || strstr($_SERVER['HTTP_USER_AGENT'],'iPad')) | |
{ | |
header('Location: http://MyiTunesAppURL'); | |
exit(); | |
} else { |