Quick Example of registering a scheme in TiApp.xml, implementing the code in app.js / alloy.js
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
function collapse(){ | |
$.myView.collapse(); | |
// $.myView.expand(); | |
} |
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 = Titanium.UI.createWindow({ | |
backgroundColor: "#ffffff", | |
title: "win" | |
}); | |
// animations | |
var animateLeft = Ti.UI.createAnimation({ | |
left: -520, | |
transform: Ti.UI.create2DMatrix({rotate: 60}), | |
opacity: 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
<!-- note the ONLY change to this is the additional module="tabIndicator" | |
attribute + properties to override indicator defaults //--> | |
<Alloy> | |
<TabGroup module="tabIndicator" tabsBackgroundColor="#000" tabIndicatorHeight="1" tabIndicatorColor="white" tabIndicatorWidth="75%"> | |
<Tab title="Tab 1" icon="/images/icons/519-tools-1.png" activeIcon="/images/icons/519-tools-1_active.png" color="#555" activeColor="#fff"> | |
<Window title="Tab 1" barColor="black" navTextColor = "#fff"> | |
<Label onClick="openWin1">Tab 1</Label> | |
</Window> | |
</Tab> | |
<Tab title="Tab 2" icon="/images/icons/516-archive-box.png" activeIcon="/images/icons/516-archive-box_active.png" color="#555" activeColor="#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
// add this to the Alloy.js file | |
// Set to run in ENV_DEV mode so it's used for testing withou | |
// having to change languages on device etc | |
// NO checks in place so assumes you know what you're doing, have | |
// the relevant strings files and specify the correct one! | |
// should work on Android - not tested yet! | |
if (ENV_DEV) { | |
Alloy.Globals.setLanguage = function(lang) { |
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
# drop this into your ./.gitconfig file | |
# usage | |
# $ git today | |
# $ git yesterday | |
# $ git since 18-11-01 | |
# | |
# will display a list of formatted commits you can lift to use for release notes | |
[alias] | |
today = log --since=1am --pretty=format:"%C(blue)-\\ %s" |
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
0411162374b5fcbd0817ddc24470640dc281136483a34ae1a1600bb6918bac5696fdb48c57a04aaaaa0c29d1e4f41148421584d10cc51beac97aae017f359d6af9 |
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
$.mySwitch.addEventListener('change',function(e){ | |
Ti.API.info('Switch value: ' + $.mySwitch.value); | |
}); |
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 o = {}; | |
// include the modules you want - purposely did this as seperate lines so it's easier to comment out modules etc | |
_.extend(o, require("module1")); | |
_.extend(o, require("module2")); | |
_.extend(o, require("module3")); | |
// make available under a single export for use in <Alloy> tag | |
module.exports = o; |
NewerOlder