[TIMOB-15015] Android: TableView.headerView cannot be set after setting data
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2020-11-17T14:30:43.000+0000 |
Affected Version/s | Release 3.1.2, Release 3.2.0, Release 9.3.0 |
Fix Version/s | 2014 Sprint 02, 2014 Sprint 02 API, Release 9.3.0 |
Components | Android |
Labels | android, headerview, qe-closed-3.3.0, qe-testadded, tableview, triage |
Reporter | Fokke Zandbergen |
Assignee | Sunila |
Created | 2013-08-16T06:57:55.000+0000 |
Updated | 2020-11-17T14:30:48.000+0000 |
Description
In the following example, the headerView doesn't show:
var w = Ti.UI.createWindow({
backgroundColor: '#fff'
});
var t = Ti.UI.createTableView();
var d = [];
for (var i = 0; i < 25; i++) {
d.push(Ti.UI.createTableViewRow({
title: 'Row ' + i
}));
}
t.setData(d);
t.headerView = Ti.UI.createView({
width: Ti.UI.FILL,
height: 50,
backgroundColor: 'red'
});
w.add(t);
w.open();
But if you set the headerView before calling setData it *does*.
Tested and confirmed on Samsung Galaxy S2 Android 2.3.6 with Ti SDK 3.1.2 GA and 3.2 CI.
Added support for setting headerView and footerView after setData. https://github.com/appcelerator/titanium_mobile/pull/5122
Additional test case:
TableView.headerView is getting set after setting data in TableView Verified the fix on : Tested on: Device: LG-P970, Android version: 4.0.4 SDK: 3.3.0.v20140619164112 CLI version : 3.3.0-rc OS : MAC OSX 10.9.2 Alloy: 1.4.0-rc ACS: 1.0.14 npm:1.3.2 LiveView: 1.0.4 Appcelerator Studio, build: 3.3.0.201406171619 titanium-code-processor: 1.1.1 XCode : 5.1.1
As of the https://github.com/appcelerator/titanium_mobile/pull/12029 I am unable to see any of the rows just the header and footer
Closing ticket it as this is an unrelated issue, will be fixed in: https://github.com/appcelerator/titanium_mobile/pull/12029