Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-23694] Windows: setting a headerView/footerView for a tableview without a height set on the view makes the view oversized

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2016-08-03T08:25:26.000+0000
Affected Version/sRelease 5.4.0
Fix Version/sRelease 6.0.0
ComponentsWindows
Labelsparity, qe-5.4.0
ReporterEwan Harris
AssigneeKota Iguchi
Created2016-07-27T18:43:23.000+0000
Updated2016-08-19T15:49:56.000+0000

Description

Description

When adding a headerView or footerView to a tableview, if the views do not have a height set then the headerView or footerView
var win = Ti.UI.createWindow({backgroundColor:'green'});

var header = Ti.UI.createView({backgroundColor: "blue"});
var lbl = Ti.UI.createLabel({text:"Valid"});
header.add(lbl);

var footer = Ti.UI.createView({backgroundColor: "blue"});
var lbl2 = Ti.UI.createLabel({text:"Invalid"});
footer.add(lbl2);

var section = Ti.UI.createTableViewSection({id:"Valid", headerView:header, footerView: footer});
section.add(Ti.UI.createTableViewRow({ title: 'Carrots' }));
section.add(Ti.UI.createTableViewRow({ title: 'Potatoes' }));

var tblView = Ti.UI.createTableView({
	data: [section]
});

win.add(tblView);
win.open();

Steps to reproduce

Using the code above build for Windows platform

Actual result

The headerView and footerView will be bigger than they should be

Expected

The headerView and footerView should be appropriately sized for the UI elements inside, as is the behaviour on iOS and Android

Comments

  1. Kota Iguchi 2016-08-03

    https://github.com/appcelerator/titanium_mobile_windows/pull/795
  2. Ewan Harris 2016-08-19

    Verified using: Windows 10 Pro Appc core: 6.0.0-26 Appc NPM: 4.2.8-5 Ti SDK: 6.0.0.v20160817065403 Lumia 930: 10.0 Luma 520: 8.1 headerView and footerView are now correctly sized to the size of the child views Closing ticket

JSON Source