Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-8250] Android : TableView Section - v8 - Section headers not being displayed in table view

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2012-10-30T00:35:38.000+0000
Affected Version/sRelease 2.0.0
Fix Version/sRelease 3.1.0, 2012 Sprint 22 API, 2012 Sprint 22
ComponentsAndroid
Labelsapi, module_tableview, qe-and031912, qe-testadded
ReporterMichael Pettiford
AssigneeKarl Rowley
Created2012-03-23T14:32:58.000+0000
Updated2014-04-28T21:42:39.000+0000

Description

Steps to reproduce: 1. Create a default mobile project in Ti Studio 2. Drop the following code into app.js:

var win = Titanium.UI.createWindow({  
    title:'test',
    backgroundColor:'#fff'
});

var label = Ti.UI.createLabel({
	text: 'Pass if Section 1 has 1 row, Section 2 has 2 rows , and Section 3 has 3 rows',
	top: 20,
	left: 10,
	height: Ti.UI.SIZE,
	width: Ti.UI.SIZE,
	color: 'black'
});

var view1 = Ti.UI.createView({
	height: 30,
	width: 60,
	top: 80,
	backgroundColor: 'green'
});

var section = Titanium.UI.createTableViewSection();
section.headerTitle = "Section 1";
var row1 = Titanium.UI.createTableViewRow({title:"Hello 1"});
section.add(row1);

var section2 = Titanium.UI.createTableViewSection();
section2.headerTitle = "Section 2";
var row3 = Titanium.UI.createTableViewRow({title:"Hello 1"});
var row4 = Titanium.UI.createTableViewRow({title:"Hello 2"});

section2.add(row3);
section2.add(row4);

var section3 = Titanium.UI.createTableViewSection();
section3.headerTitle = "Section 2";
var row6 = Titanium.UI.createTableViewRow({title:"Hello 1"});
var row7 = Titanium.UI.createTableViewRow({title:"Hello 2"});
var row8 = Titanium.UI.createTableViewRow({title:"Hello 2"});

section3.add(row6);
section3.add(row7);
section3.add(row8);

var tableView = Ti.UI.createTableView({
	top: 70,
	data: [section, section2, section3]
});


win.add(tableView);
win.add(label);
win.open();
2. Run the app Actual result: Table view is displayed without section headers Expected result: Section headers are dispayed

Comments

  1. Wilson Luu 2012-03-23

    Also, happens on Galaxy Nexus (4.0.2) on V8, SDK build: 2.0.0.v20120322190311
  2. Satyam Sekhri 2012-03-26

    Also occurs on Kindle Fire and Nook Color Titanium SDK: 2.0.0.v20120325213306 Titanium Studio, build: 2.0.0.201203262445
  3. Tamila Smolich 2012-03-26

    Exists on: Titanium Studio, build: 2.0.0.201203262445 SDK: 2.0.0.v20120325213306 Device: Android Nexus S (2.3.6)
  4. Sitara Shylaja 2012-03-26

    This also happens on Android(2.2.2) Nexus 1 on Titanium mobilesdk-2.0.0.v20120325213306 Titanium Studio build: 2.0.0.201203262445
  5. Karl Rowley 2012-10-26

    Pull request https://github.com/appcelerator/titanium_mobile/pull/3340
  6. Satyam Sekhri 2013-01-21

    Tested with: SDK:3.1.0.v20130114171802 Studio:3.0.1.201212181159 Device: LG-p970(v 2.2.2)
  7. Uriel Arvizu 2014-04-28

    Can we reopen this ticket? We're testing on a Moto G with KitKat and a Xperia Acro S with Jelly Bean 4.1.2 using Titanium SDK 3.2.0.GA and it always fails to display the header views on a tableview, but if we open a window on top of the window that contains the tableview and then close it, the tableviewsections are displayed normally.

JSON Source