Skip to content

Instantly share code, notes, and snippets.

@rvulpescu
Created March 25, 2011 14:10
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 rvulpescu/886885 to your computer and use it in GitHub Desktop.
Save rvulpescu/886885 to your computer and use it in GitHub Desktop.
Titanium.UI.setBackgroundColor('#000');
var win1 = Titanium.UI.createWindow({
title:'Window 1',
backgroundColor:'#fff'
});
var data = [];
var group = Ti.UI.createTableViewSection();
group.add(Ti.UI.createTableViewRow({
title: 'Row in group 1'
}));
//From tableView guide
group.headerView = Ti.UI.createLabel({
backgroundColor: "#035385",
color:"white",
font:{ fontSize: 16, fontWeight:"bold" },
text:"Group 1 header",
textAlign:"center",
height:35,
width:320
});
data.push(group);
var group2 = Ti.UI.createTableViewSection();
group2.add(Ti.UI.createTableViewRow({
title: 'Row in group 2'
}));
group2.headerView = Ti.UI.createLabel({
backgroundColor: "#035385",
color:"white",
font:{ fontSize: 16, fontWeight:"bold" },
text:"Group 2 header",
textAlign:"center",
height:35,
width:320
});
data.push(group2);
var tableview = Titanium.UI.createTableView({
data : data
});
win1.add(tableview);
win1.open();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment