Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-8789] Android: headerView label displaying issues after scrolling the tableView

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-07-10T03:15:20.000+0000
Affected Version/sRelease 2.1.0
Fix Version/sRelease 2.0.2, Release 2.1.0, Sprint 2012-09 Core
ComponentsAndroid
LabelsSupportTeam, core, module_views, qe-testadded, regression
ReporterFederico Casali
AssigneeAllen Yeung
Created2012-04-18T17:43:30.000+0000
Updated2012-07-10T13:53:40.000+0000

Description

Scenario description

Define a label inside a view and add the view to a tableView as headerView property. After scrolling the tableView, the label might move outside of the view, resulting being invisible or truncated.

Sample code and step to reproduce

- Run the code below. - Scroll up and down the tableView. Result: the label in the headerView might move outside of the view, resulting in being invisible or truncated. This behavior does not seems to be always reproducible, it might take two or three scrolling attempts. Also, I've not been able to reproduce the issue if commenting out all properties from the label (except 'text' of course). Not reproducible on 1.7.6 TiSDK
var	win = Titanium.UI.createWindow({
		// barColor : '#929292',
		// title : 'something',
		// backgroundColor : '#E7E7E7'
	});
				
var labelPlan = Titanium.UI.createLabel({
		top : 20,
		// height : 56,
		// left : '5%',
		// left:20,
		// right:10,
		// right:'3%',
		// width : '93.75%',
		// color : '#363636',
		// font : {
			// fontSize : 15,
			// fontWeight : 'bold',
			// fontFamily : 'Helvetica Neue'
		// },
		text : 'testing'
});


var subView = Titanium.UI.createView({
			layout : 'vertical',
			top : 0,
			left : 0,
			height:56,
			// height:Ti.UI.SIZE,
			backgroundColor : 'red'
		});
		
		
		subView.add(labelPlan)
		var dataSource=[]
		for(var i=0;i<100;i++){
			var row = Ti.UI.createTableViewRow({
		height : 80,
		//touchEnabled:false
	});
	
var	tf1 = Titanium.UI.createTextField({
			color : '#336699',
			height : 80,
			top : 10,
			left : 10,
			width : 250,
			hintText : 'hint' + i
		});
	row.add(tf1);
	dataSource.push(row)
		}
		
var menuTableView = Titanium.UI.createTableView({
			separatorColor:'#e7e7e7',
			data : dataSource,
			backgroundColor :'#e7e7e7',
			headerView:subView
		});

// menuTableView.headerView=subView;
win.add(menuTableView);

win.open();

Comments

  1. Hieu Pham 2012-04-25

    This is a layout issue. One possible workaround is to remove 'layout: vertical' from subView.
  2. Vishal Duggal 2012-05-01

    PR 2094
  3. Natalie Huynh 2012-05-10

    Tested with 2.0.2.v20120505151714 with droid 2.2.3
  4. Shyam Bhadauria 2012-07-10

    Re-opening to edit label

JSON Source