problem
On Android, when creating a Ti.UI.TableView, if the TableView's and a TableViewSection's footerViews are both at the bottom of the table, the TableViewSections's footerView is not visible. It's not clear whether they are overalapping, or if the section's footerView is never rendered at all.
test case
var rowCtr = 0,
data = [];
var win = Ti.UI.createWindow({
backgroundColor: '#fff',
fullscreen: false,
exitOnClose: true
});
var section = Ti.UI.createTableViewSection({
headerView: extraView('headerView', 'section'),
footerView: extraView('footerView', 'section')
});
genRows(4, data);
genRows(4, section);
data.push(section);
var table = Ti.UI.createTableView({
data: data,
headerView: extraView('headerView', 'table'),
footerView: extraView('footerView', 'table')
});
win.add(table);
win.open();
function extraView(type, parent) {
return Ti.UI.createLabel({
text: parent + ' ' + type,
backgroundColor: parent === 'table' ? '#a00' : '#00a',
color: '#fff',
height: '40dp',
width: Ti.UI.FILL
});
}
function genRows(num, obj) {
var isSection = typeof obj.length === 'undefined';
for (var i = 0; i < num; i++) {
var row = Ti.UI.createTableViewRow({
title: (isSection ? 'section ' : '') + 'row ' + (++rowCtr)
});
if (!isSection) {
obj.push(row);
} else {
obj.add(row);
}
}
}
screenshots
One screenshot shows the problem on Android. One screenshot shows the test case working properly on iOS.
Added code to handle footer view. https://github.com/appcelerator/titanium_mobile/pull/4907
+Verified fixed on:+ Mac OSX 10.9 Mavericks Titanium Studio, build: 3.2.0.201311252022 Titanium SDK, build: 3.2.0.v20131125232254 CLI: 3.2.0-alpha3 Alloy: 1.3.0-alpha6 Android Device: HTC One (4.3) HTC One shows the table simular to the iOS screenshot. Headers and Footers and showing for both table rows and sections rows. Closing.