Skip to content

Commit

Permalink
testing/ALOY-612 test app
Browse files Browse the repository at this point in the history
  • Loading branch information
tonylukasavage committed May 24, 2013
1 parent cc5588e commit f9c16fb
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/apps/testing/ALOY-612/controllers/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
$.index.open();

var style = require('alloy/styles/index');
var i, len;
for (i = 0, len = $.index.children.length; i < len; i++) {
var child = $.index.children[i];
child.addEventListener('click', function(e) {
var id = e.source.id;
_.each(style, function(o) {
if (o.key === id && o.isId) {
// print each style that applies by ID to the source
Ti.API.info(JSON.stringify(o));
}
});
});
}
14 changes: 14 additions & 0 deletions test/apps/testing/ALOY-612/styles/app.tss
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
"Window": {
backgroundColor: '#fff',
fullscreen: false
}

"Label": {
color: '#000',
height: Ti.UI.SIZE,
width: Ti.UI.SIZE
}

"Button": {
color: '#500'
}
41 changes: 41 additions & 0 deletions test/apps/testing/ALOY-612/styles/index.tss
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
"Button": {
top: '15dp'
}

"#index": {
layout: 'vertical'
}

"#index[platform=android]": {
exitOnClose: true
}

"#info": {
top: '15dp',
textAlign: 'center',
width: '250dp',
font: {
fontSize: '18dp',
fontWeight: 'normal'
}
}

"#button1": {
height: '70dp',
width: '250dp',
borderRadius: 8,
borderWidth: 2,
borderColor: '#500'
}

"#button2": {
width: '100dp'
}

"#button3": {
height: '40dp',
width: '200dp',
borderRadius: 32,
borderWidth: 1,
borderColor: '#0f0'
}
8 changes: 8 additions & 0 deletions test/apps/testing/ALOY-612/views/index.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<Alloy>
<Window>
<Label id="info">Click anything to see its ID style entry</Label>
<Button id="button1">button1</Button>
<Button id="button2">button2</Button>
<Button id="button3">button3</Button>
</Window>
</Alloy>

0 comments on commit f9c16fb

Please sign in to comment.