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
# Put me in: ~/Library/Application Support/Sublime Text 2/Packages/User/ | |
# Set your layout to Grid 4 - Go to view > layout > Grid: 4 | |
# Based on this Gist from Fokke - https://gist.github.com/FokkeZB/6218345 | |
# Alloy lay-out for Sublime Text http://withtitanium.com/2013/08/titanium-alloy-optimized-sublime-text-2-layout/ | |
# Put me in: ~/Library/Application Support/Sublime Text 2/Packages/User/ | |
import sublime, sublime_plugin, inspect | |
from os.path import splitext |
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.getCurrentPosition(function(e) | |
{ | |
if (!e.success || e.error) | |
{ | |
Ti.API.debug('error ' + JSON.stringify(e.error)); | |
return; | |
} | |
Ti.Geolocation.addEventListener('location',function(e) | |
{ | |
if (!e.success || e.error) |
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 intial Window Group for use in the tab groups | |
var win1 = Ti.UI.createWindow({title: 'Page1', titleid: 'page1', backgroundColor: '#fff'}); | |
var win2 = Ti.UI.createWindow({title: 'Page2', titleid: 'page2', backgroundColor: '#fff'}); | |
// Create New tab group before adding individual tabs | |
var tabGroup1 = Ti.UI.createTabGroup({id: 'firstTabGroup', bottom: 0,height: 40, barColor: 'green'}); | |
// Create the individual tabs with titles and icons | |
var tab1 = Ti.UI.createTab({ | |
window:win1, |
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 GeoTest = { | |
init: function(){ | |
Ti.API.debug('Using an '+Ti.Platform.osname+' device'); | |
GeoTest.win2 = Ti.UI.createWindow({ | |
backgroundColor:"#d4fdfd", | |
title: 'GPS Android Test' | |
}); | |
GeoTest.win2.open(); | |
var gpsTestLabel = Titanium.UI.createLabel({ | |
text:'GPS Test started', |
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'); | |
// | |
// create base UI tab and root window | |
// | |
var win1 = Titanium.UI.createWindow({ | |
title:'Tab 1', | |
backgroundColor:'#fff' | |
}); |
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 GO = { | |
init: function(){ | |
// Delete the property data | |
Ti.API.debug('Removing properties'); | |
Ti.App.Properties.removeProperty("latitude"); | |
Ti.App.Properties.removeProperty("longitude"); | |
Ti.App.Properties.removeProperty("geoAccuracy"); | |
Ti.App.Properties.removeProperty("geoTimestamp"); | |
var propTimestamp = Ti.App.Properties.getString("geoTimestamp"); |
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
#styleID { | |
width: 250; | |
height: 82; | |
backgroundImage: 'none'; | |
backgroundSelectedColor: '#e2ffee'; | |
borderColor: '#0000ff'; | |
borderWidth: 1; | |
borderRadius:5; | |
} |
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
[ERROR] The application has crashed with an unhandled exception. Stack trace: | |
0 CoreFoundation 0x0238658c __exceptionPreprocess + 156 | |
1 libobjc.A.dylib 0x024da313 objc_exception_throw + 44 | |
2 CoreFoundation 0x023880bb -[NSObject(NSObject) doesNotRecognizeSelector:] + 187 | |
3 CoreFoundation 0x022f7966 ___forwarding___ + 966 | |
4 CoreFoundation 0x022f7522 _CF_forwarding_prep_0 + 50 | |
5 Festival App 0x0033008b -[TiDebugger log:level:] + 134 | |
6 Festival App 0x00331b10 TiDebuggerLogMessage + 69 | |
7 Festival App 0x00143656 -[APIModule logMessage:severity:] + 486 |
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
fa.device = { | |
density: Ti.Platform.displayCaps.density, | |
platformHeight: Ti.Platform.displayCaps.platformHeight, | |
platformWidth: Ti.Platform.displayCaps.platformWidth, | |
dpi: Ti.Platform.displayCaps.dpi | |
}; |
OlderNewer