-
-
Save taazza/ab80b6d74e1559bdb7f5 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
var win1 = Ti.UI.createWindow({ | |
title:'Window 1', | |
backgroundColor:'#fff', | |
exitOnClose: true, | |
}); | |
var tabview = Ti.UI.createTableView(); | |
win1.add(tabview); | |
win1.open(); | |
// var data = []; | |
for (var i=0; i < 15; ++i) | |
{ | |
var row = Ti.UI.createTableViewRow({ | |
height: 50, | |
className: 'item', | |
irow: i, | |
}); | |
row.addEventListener('click', function(e) { | |
alert("Item Title " + this.irow); | |
}); | |
var tView = Ti.UI.createView({ | |
height: 50, | |
}); | |
tView.add(Ti.UI.createLabel({ | |
text: "Item Title " + i, | |
color: '#333', | |
top: 10, | |
})); | |
tView.add(Ti.UI.createLabel({ | |
text: "Item Description " + i, | |
color: '#888', | |
top: 30, | |
})); | |
row.add(tView); | |
// data.push(row); | |
tabview.appendRow(row); | |
} | |
// tabview.setData(data); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment