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
// For iOS7 only, set the window's top to 20 so they start under the status bar. | |
Alloy.Globals.windowTop = (OS_IOS && parseInt(Ti.Platform.version[0], 10) >= 7) ? 20 : 0; |
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
http://developer.android.com/guide/topics/resources/providing-resources.html#ScreenAspectQualifier | |
if ((Ti.Platform.displayCaps.platformWidth / Ti.Platform.displayCaps.platformHeight) < (((Ti.Gesture.orientation === Ti.UI.LANDSCAPE_LEFT)) ? (320 / 240) : (240 / 320)))) { | |
Ti.API.info('I am LONG'); | |
} else { | |
Ti.API.info('I am NOTLONG'); | |
} |
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
'Label[platform=android]': { | |
color: '#000' // all platforms except Android default to black | |
} | |
'Window': { | |
backgroundColor: '#fff' // white background instead of default transparent | |
} | |
'Window[platform=android]': { | |
modal: false // make android windows all heavyweight |
I guess just like me you like to do alert('My message');
instead of:
Ti.UI.createAlertDialog({
message: 'My message'
}).show();
But I'd even more like to do alert('My message', 'My title', myCallback);
instead of:
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 v = Ti.UI.createView(); | |
var s = new require('spinner').Spinner( | |
v, // View to spin | |
30 // Degrees to spin per millisecond | |
); // Auto-starts | |
// Stop | |
s.stop(); |
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
/* /Resources/app.js - Generated by Alloy, here to understand the flow */ | |
var Alloy = require("alloy"), _ = Alloy._, Backbone = Alloy.Backbone; | |
Alloy.createController("index"); |
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
<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" /> |
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
'Label[platform=android]': { | |
color: '#000' // all platforms except Android default to black | |
} | |
'Window': { | |
backgroundColor: '#fff' // white background instead of default transparent | |
} | |
'Window[platform=android]': { | |
modal: false // make android windows all heavyweight |
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
Show hidden characters
{ | |
"globals": { | |
"Ti": false, | |
"Titanium": false, | |
"Alloy": false, | |
"describe": false, | |
"it": false, | |
"before": false, | |
"beforeEach": false, | |
"after": false, |
OlderNewer