Created
November 23, 2012 19:36
-
-
Save ricardoalcocer/4136985 to your computer and use it in GitHub Desktop.
Basic Alloy : Static TableView Handling
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 showItems(e) { | |
Ti.API.info(e.rowData.itemName); | |
} | |
$.win.open(); |
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
"#container": { | |
backgroundColor:"white" | |
}, | |
"#itemName": { | |
width: Ti.UI.SIZE, | |
height: Ti.UI.SIZE, | |
color: "#000", | |
left: 0 | |
}, | |
"#row":{ | |
height: "40dp", | |
hasChild: true | |
} |
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> | |
<Window id="win"> | |
<TableView id="itemsList" onClick="showItems"> | |
<TableViewRow id="row" rowId="1" itemName="Test1"> | |
<Label id="itemName">Test 1</Label> | |
</TableViewRow> | |
<TableViewRow id="row" rowId="2" itemName="Test2"> | |
<Label id="itemName">Test 2</Label> | |
</TableViewRow> | |
<TableViewRow id="row" rowId="3" itemName="Test3"> | |
<Label id="itemName">Test 3</Label> | |
</TableViewRow> | |
<TableViewRow id="row" rowId="4" itemName="Test4"> | |
<Label id="itemName">Test 4</Label> | |
</TableViewRow> | |
<TableViewRow id="row" rowId="5" itemName="Test5"> | |
<Label id="itemName">Test 5</Label> | |
</TableViewRow> | |
</TableView> | |
</Window> | |
</Alloy> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment