Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-2525] TableView using TableSection with custom headerView rendering iPad

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionCannot Reproduce
Resolution Date2012-07-20T15:19:44.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
Labelsn/a
ReporterJérémy R
AssigneeNeeraj Gupta
Created2011-04-15T03:21:57.000+0000
Updated2017-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();

Comments

  1. Neeraj Gupta 2012-07-20

    Does not reproduce with release 2.1.0.
  2. Lee Morris 2017-03-09

    Closing ticket as the issue cannot be reproduced.

JSON Source