Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-15646] Android: footerViews for sections in TableView disappear when sections have them too

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2013-11-08T00:15:47.000+0000
Affected Version/sRelease 3.2.0
Fix Version/s2013 Sprint 23, 2013 Sprint 23 API, Release 3.2.0
ComponentsAndroid
Labelsmodule_tableview, parity, qe-closed-3.2.0, qe-manualtest, qe-testadded, tableView
ReporterTony Lukasavage
AssigneeSunila
Created2013-11-02T22:41:48.000+0000
Updated2014-11-19T01:17:25.000+0000

Description

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.

Attachments

FileDateSize
Screen Shot 2013-11-02 at 6.34.47 PM.png2013-11-02T22:42:16.000+000041608
Screen Shot 2013-11-02 at 6.37.33 PM.png2013-11-02T22:42:16.000+000021447

Comments

  1. Sunila 2013-11-04

    Added code to handle footer view. https://github.com/appcelerator/titanium_mobile/pull/4907
  2. Samuel Dowse 2013-11-26

    +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.

JSON Source