[TIMOB-17724] Android: Only last row with same classname is shown when tableview has height set to TI.UI.SIZE
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2014-09-19T22:45:32.000+0000 |
Affected Version/s | Release 3.4.0 |
Fix Version/s | Release 3.4.0, Release 3.5.0 |
Components | Android |
Labels | module_tableviewrow, qe-3.4.0, qe-manualtest, qe-testadded, regression |
Reporter | Satyam Sekhri |
Assignee | Ping Wang |
Created | 2014-09-18T09:31:48.000+0000 |
Updated | 2014-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
File | Date | Size |
---|---|---|
3_3_0.png | 2014-09-18T09:31:48.000+0000 | 50410 |
3_4_0.png | 2014-09-18T09:31:48.000+0000 | 43557 |
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
This regression is caused by [PR#5239](https://github.com/appcelerator/titanium_mobile/pull/5239).
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
master PR: https://github.com/appcelerator/titanium_mobile/pull/6134 backport: https://github.com/appcelerator/titanium_mobile/pull/6135
PRs merged.
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)