Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-17724

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

    Details

    • 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

            Activity

              People

              • Assignee:
                pwang Ping Wang
                Reporter:
                ssekhri Satyam Sekhri
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-19232
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Source Code