Created
March 25, 2011 14:10
-
-
Save rvulpescu/886885 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
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