Skip to content

Instantly share code, notes, and snippets.

@taazza

taazza/app.js Secret

Created December 30, 2010 10:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save taazza/ab80b6d74e1559bdb7f5 to your computer and use it in GitHub Desktop.
Save taazza/ab80b6d74e1559bdb7f5 to your computer and use it in GitHub Desktop.
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