Last active
September 7, 2017 21:21
-
-
Save mukherjee2/9b433fe8054849b92d51646ab362dca4 to your computer and use it in GitHub Desktop.
Android headerView test on 7.1.2
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
Ti.UI.backgroundColor = 'white'; | |
var win = Ti.UI.createWindow(); | |
var sectionFruit = Ti.UI.createTableViewSection({ headerTitle: 'Fruit' }); | |
sectionFruit.add(Ti.UI.createTableViewRow({ title: 'Apples' })); | |
sectionFruit.add(Ti.UI.createTableViewRow({ title: 'Bananas' })); | |
sectionFruit.add(Ti.UI.createTableViewRow({ title: 'Peaches' })); | |
sectionFruit.add(Ti.UI.createTableViewRow({ title: 'Pears' })); | |
var sectionVeg = Ti.UI.createTableViewSection({ headerView: Ti.UI.createView({backgroundColor: 'orange', height: 40}) }); | |
sectionVeg.add(Ti.UI.createTableViewRow({ title: 'Carrots' })); | |
sectionVeg.add(Ti.UI.createTableViewRow({ title: 'Potatoes' })); | |
sectionVeg.add(Ti.UI.createTableViewRow({ title: 'Spinach' })); | |
sectionVeg.add(Ti.UI.createTableViewRow({ title: 'Cabbage' })); | |
var sectionBerries = Ti.UI.createTableViewSection({ headerTitle: 'Berries' }); | |
sectionBerries.add(Ti.UI.createTableViewRow({ title: 'Strawberries' })); | |
sectionBerries.add(Ti.UI.createTableViewRow({ title: 'Blueberries' })); | |
sectionBerries.add(Ti.UI.createTableViewRow({ title: 'Cranberries' })); | |
sectionBerries.add(Ti.UI.createTableViewRow({ title: 'Blackberries' })); | |
var sectionCitrus = Ti.UI.createTableViewSection({ headerTitle: 'Citrus' }); | |
sectionCitrus.add(Ti.UI.createTableViewRow({ title: 'Oranges' })); | |
sectionCitrus.add(Ti.UI.createTableViewRow({ title: 'Lemons' })); | |
sectionCitrus.add(Ti.UI.createTableViewRow({ title: 'Limes' })); | |
sectionCitrus.add(Ti.UI.createTableViewRow({ title: 'Grapefruit' })); | |
var sectionTropical = Ti.UI.createTableViewSection({ headerTitle: 'Tropical' }); | |
sectionTropical.add(Ti.UI.createTableViewRow({ title: 'Pineapples' })); | |
sectionTropical.add(Ti.UI.createTableViewRow({ title: 'Mangos' })); | |
var table = Ti.UI.createTableView({ | |
data: [sectionFruit, sectionVeg, sectionBerries, sectionCitrus, sectionTropical] | |
}); | |
win.add(table); | |
win.open(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment