Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

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

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2016-08-03T08:25:11.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:31:04.000+0000
Updated2016-08-19T16:22:34.000+0000

Description

Description

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

var listView = Ti.UI.createListView();

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.createListSection({id:"Valid", headerView:header, footerView: footer});
var data = [
	{properties: { title: 'Test text'}},
];
section.setItems(data);

listView.setSections([section]);
win.add(listView);
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