Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-10087] Android: TableView - Headers appear with incorrect labels on Android

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionDuplicate
Resolution Date2012-10-09T20:55:05.000+0000
Affected Version/sRelease 2.1.1
Fix Version/sn/a
ComponentsAndroid
Labelsapi, qe-and070112
ReporterTamila Smolich
AssigneeKarl Rowley
Created2012-07-23T11:34:27.000+0000
Updated2017-03-20T22:08:26.000+0000

Description

Description: During testing TableView module I noticed, that headers appear with incorrect labels: Header 1 for Group 1, Header 2 for Group 2, Header 1 for Group 3 and Header 2 for Group 4. If we run the code with uncommented part of code:
for (var x=0;x<10;x++)
  {
	data[c].add(Ti.UI.createTableViewRow({title:'Group '+(c+1)+', Row '+(x+1)}));
  }
	
     }
, headers appear with correct labels. This is not a regression, the behavior occurs as far as 2.0.2 at least. Steps to reproduce: 1. Run the following code:
		var _window = Ti.UI.createWindow({backgroundColor: "white"});

		var tableView = Ti.UI.createTableView();
		
		var data = [];
		
		for (var c=0;c<4;c++)
		{
			
			var label = Ti.UI.createLabel({
				text:'Header ' + (c+1),
				color:'black',
				width:'auto',
				height: 'auto',
				left:4
			});
			
			var pinkHeader = Ti.UI.createView({backgroundColor: 'pink', height: 40});
			pinkHeader.add(label);
			
			data[c] = Ti.UI.createTableViewSection({
				headerView: pinkHeader
				
			});

			
			for (var x=0;x<10;x++)
			{
				data[c].add(Ti.UI.createTableViewRow({title:'Group '+(c+1)+', Row '+(x+1)}));
			}
	
		}
		
		tableView.data = data;
		
		_window.add(tableView);
		
		_window.open();
2. Scroll down to see all headers. Actual result: Headers appear with incorrect labels Expected result: Headers should appear with correct labels

Comments

  1. Ray Belisle 2012-09-19

    This is still broken in 2.1.3 RC just released yesterday... Need a fix please!
  2. Shannon Hicks 2012-09-19

    2.1.3 is an update for iOS 6 / iPhone 5, so I wouldn't expect any non iOS 6 bugs to be fixed, even on the iOS side.
  3. Ray Belisle 2012-09-19

    My comment wasn't to expect a fix, just saying that this has been a problem for revs since 1.7.x (where I first see some people reporting the problem). Just seems to be lingering and I wanted Devs to know that even with the latest version, it is still a problem.
  4. Karl Rowley 2012-09-26

    I can't reproduce this with the latest pending pull requests for tableview. These are the two pending requests: https://github.com/appcelerator/titanium_mobile/pull/3033 https://github.com/appcelerator/titanium_mobile/pull/3043 Also, this is related to TIMOB-10238
  5. Karl Rowley 2012-10-09

    Duplicate of [TIMOB-10458]

JSON Source