Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Medium
-
Resolution: Fixed
-
Affects Version/s: Release 3.4.0
-
Fix Version/s: Release 3.4.0, Release 3.5.0
-
Component/s: Android
-
Environment:
Tested On:
SDK: 3.4.0.v20140917120000
Studio: 3.4.0.201409161950
CLI: 3.4.0-rc4
Alloy: 1.5.0-rc2
Device: Nexus 5 (v4.4.4)
-
Sprint:2018 Sprint 05 SDK
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
Issue Links
- is triggered by
-
TIMOB-15621 Android: convertPointToView gives different results with SDK 3.1.3 compared to 3.0.2
-
- Open
-