Created
August 6, 2013 14:21
-
-
Save rblalock/6164916 to your computer and use it in GitHub Desktop.
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
/** | |
* Generates the column data | |
*/ | |
$.generateColumn = function() { | |
var numbers = [9, 8, 7, 6, 5, 4, 3, 2, 1, 0]; | |
var labels = []; | |
numbers.forEach(function(_number) { | |
labels.push( | |
Ti.UI.createLabel({ | |
text: _number, | |
transform: Ti.UI.create2DMatrix({ | |
rotate: 90 | |
}) | |
})); | |
}); | |
return labels; | |
}; | |
$.column1.views = $.generateColumn(); | |
$.column2.views = $.generateColumn(); | |
$.column3.views = $.generateColumn(); | |
$.column4.views = $.generateColumn(); | |
$.column5.views = $.generateColumn(); | |
$.column6.views = $.generateColumn(); | |
$.column1.transform = Ti.UI.create2DMatrix({ | |
rotate: -90 | |
}); | |
$.column2.transform = Ti.UI.create2DMatrix({ | |
rotate: -90 | |
}); | |
$.column3.transform = Ti.UI.create2DMatrix({ | |
rotate: -90 | |
}); | |
$.column4.transform = Ti.UI.create2DMatrix({ | |
rotate: -90 | |
}); | |
$.column5.transform = Ti.UI.create2DMatrix({ | |
rotate: -90 | |
}); | |
$.column6.transform = Ti.UI.create2DMatrix({ | |
rotate: -90 | |
}); |
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
"#meterWrapper": { | |
layout: "horizontal", | |
height: 50 | |
}, | |
".column": { | |
width: 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
<Alloy> | |
<View id="wrapper"> | |
<View id="meterWrapper"> | |
<ScrollableView id="column1" class="column" /> | |
<ScrollableView id="column2" class="column" /> | |
<ScrollableView id="column3" class="column" /> | |
<ScrollableView id="column4" class="column" /> | |
<ScrollableView id="column5" class="column" /> | |
<ScrollableView id="column6" class="column" /> | |
</View> | |
</View> | |
</Alloy> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment