Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-17724] Android: Only last row with same classname is shown when tableview has height set to TI.UI.SIZE

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2014-09-19T22:45:32.000+0000
Affected Version/sRelease 3.4.0
Fix Version/sRelease 3.4.0, Release 3.5.0
ComponentsAndroid
Labelsmodule_tableviewrow, qe-3.4.0, qe-manualtest, qe-testadded, regression
ReporterSatyam Sekhri
AssigneePing Wang
Created2014-09-18T09:31:48.000+0000
Updated2014-11-21T20:24:06.000+0000

Description

When a tableview has few rows with same classname then only the last row amongst them is shown. Also this happens when the height of the tableview is set to TI.UI.SIZE. This is a Regression as the issue does not occur in SDK 3.3.0.GA Steps to Reproduce: 1. Run the app with code below on an Android device Actual Result: Only two rows out of four are shown. Both the rows are the last row within the the set of rows that have same classname. (refer to attached screenshots for difference in 3.3.0 and 3.4.0 SDK) If the height of tableview is not TI.UI.SIZE, then the issue will not occur. Expected Result: All the rows in the tableview should be shown
var window = Ti.UI.createWindow({
	backgroundColor: 'white'
});
var loginRow1 = Ti.UI.createTableViewRow({
	height : "45dp",
	backgroundColor : "red",
	className : "loginRow",
	id : "row1"
});

var rowArray = [];
rowArray.push(loginRow1);

var loginRowLabel1 = Ti.UI.createLabel({
	left : "5dp",
	width : "100dp",
	height : Ti.UI.SIZE,
	color : "black",
	font : {
		fontSize : "16dp"
	},
	text : "Login Row 1",
});
loginRow1.add(loginRowLabel1);

var loginRow2 = Ti.UI.createTableViewRow({
	height : "45dp",
	backgroundColor : "blue",
	className : "loginRow",
	id : "row2"
});

rowArray.push(loginRow2);

var loginRowLabel2 = Ti.UI.createLabel({
	left : "5dp",
	width : "100dp",
	height : Ti.UI.SIZE,
	color : "black",
	font : {
		fontSize : "16dp"
	},
	text : "Login Row 2",
	});
	loginRow2.add(loginRowLabel2);
	
var detailRow1 = Ti.UI.createTableViewRow({
		height : "45dp",
	backgroundColor : "green",
	className : "detailRow",
	id : "row3"
});

rowArray.push(detailRow1);

var detailRowLabel1 = Ti.UI.createLabel({
	left : "5dp",
	width : "100dp",
	height : Ti.UI.SIZE,
	color : "black",
	font : {
		fontSize : "16dp"
	},
	text : "Detail Row 1",
});
detailRow1.add(detailRowLabel1);

var detailRow2 = Ti.UI.createTableViewRow({
	height : "45dp",
	backgroundColor : "yellow",
	className : "detailRow",
	id : "row4"
});

rowArray.push(detailRow2);

var detailRowLabel2 = Ti.UI.createLabel({
	left : "5dp",
	width : "100dp",
	height : Ti.UI.SIZE,
	color : "black",
	font : {
		fontSize : "16dp"
	},
	text : "Detail Row 2",
});
detailRow2.add(detailRowLabel2);

var formView = Ti.UI.createTableView({
	left : "10dp",
	right : "10dp",
	width : Ti.UI.FILL,
	backgroundColor : "transparent",
	top : "10dp",
	height : Ti.UI.SIZE, //comment this line and the issue does not occur
	borderWidth : "1dp",
	borderRadius : 10,
	borderColor : "#999",
	separatorColor:"green",
	data : rowArray,
	id : "formView"
});

window.add(formView);
window.open();

Attachments

FileDateSize
3_3_0.png2014-09-18T09:31:48.000+000050410
3_4_0.png2014-09-18T09:31:48.000+000043557

Comments

  1. jithinpv 2014-09-19

    Issue reproduces Titanium SDK version 3.4.0 master Titanium Studio, build: 3.3.0.201407100905 Titanium Command-Line Interface CLI version 3.3.0, Android device : Motorola Moto G, Android version : 4.4.4
  2. Ping Wang 2014-09-19

    This regression is caused by [PR#5239](https://github.com/appcelerator/titanium_mobile/pull/5239).
  3. Lokesh Choudhary 2014-09-19

    Verified the issue is reproducible & is a regression. Environment: Appc Studio : 3.4.0.201409161950 Ti SDK : 3.4.0.v20140918202513 Mac OSX : 10.9.4 Alloy : 1.5.0-rc3 CLI - 3.4.0-rc4 Code Processor: 1.1.1 Nexus 5 - android 4.4.4
  4. Hieu Pham 2014-09-19

    master PR: https://github.com/appcelerator/titanium_mobile/pull/6134 backport: https://github.com/appcelerator/titanium_mobile/pull/6135
  5. Pedro Enrique 2014-09-19

    PRs merged.
  6. Satyam Sekhri 2014-09-22

    All the rows having the same classname are shown Verified on: Tested On: SDK: 3.4.0.v20140919162515 Studio: 3.4.0.201409161950 CLI: 3.4.0-rc4 Alloy: 1.5.0-rc3 Device: Nexus 5(v4.4.4)

JSON Source