[TIMOB-2525] TableView using TableSection with custom headerView rendering iPad
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2012-07-20T15:19:44.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | iOS |
Labels | n/a |
Reporter | Jérémy R |
Assignee | Neeraj Gupta |
Created | 2011-04-15T03:21:57.000+0000 |
Updated | 2017-03-09T22:18:41.000+0000 |
Description
Hi,
I didn't try on iOS devices but only on the iPad, but I have a
rendering problem with the following snippet :
There is a similar titled issue https://appcelerator.lighthouseapp.com/projects/32238-titanium-mobile/tickets/2282"> https://appcelerator.lighthouseapp.com/projects/32238-titanium-mobi... but I runned the given snippet and it doesn't seems related to the issue I encounter.
Is is a bug or a bad usage of the APIs ?
NB: the rendering behavior is correct if you comment the line "tableSection.headerView = customHeader;"
function createCustomTableSection() {
var tableSection = Titanium.UI.createTableViewSection({
headerTitle: 'Monday 05 July 2010'
});
var customHeader = Titanium.UI.createView({
height: 45,
backgroundImage: 'table_section_bg.png'
});
var dateLabel = Titanium.UI.createLabel({
text:'Monday 05 July 2010',
color:'#b4d0ee',
top: 5,
left: 5
});
customHeader.add(dateLabel);
tableSection.headerView = customHeader;
tableSection.add(Titanium.UI.createTableViewRow({title:'Monday 05 July 2010'}));
tableSection.add(Titanium.UI.createTableViewRow({title:'Tuesday 06 July 2010'}));
tableSection.add(Titanium.UI.createTableViewRow({title:'Wednesday 07 July 2010'}));
tableSection.add(Titanium.UI.createTableViewRow({title:'Thursday 08 July 2010'}));
return tableSection;
}
Titanium.UI.setBackgroundColor('#000');
var win = Titanium.UI.createWindow();
// Create header var header = Titanium.UI.createView({
backgroundImage: 'home_header.png',
top: 0,
height: 43
});
var l = Titanium.UI.createLabel({
text: 'Plenary sessions',
color: 'white',
font:{fontSize: 18},
height: 'auto',
right: 'auto',
top: 5,
left: 10,
width: 150
});
header.add(l);
win.add(header);
var sections = [];
for (var i = 0; i < 8; i++) {
sections[i] = createCustomTableSection();
}
var tableView = Titanium.UI.createTableView();
tableView.setData(sections);
win.add(tableView);
win.open();
Does not reproduce with release 2.1.0.
Closing ticket as the issue cannot be reproduced.