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

Android: TableViewRows children are not visible with vertical layout

    Details

      Description

      This is a regression caused by the fix for TIMOB-12658.

      Steps to reproduce:
      1. Run the following code:

      var win = Ti.UI.createWindow({
      	backgroundColor: 'white',
      	layout: 'vertical'
      });
       
      var table = Ti.UI.createTableView({
          top: 10,
          bottom: 0,
          left: "4dp",
          right: "4dp",
          backgroundColor: "blue",
          font: {
              fontSize: "20dp",
              fontFamily: "DroidSans"
          }
      });
      var row = Ti.UI.createTableViewRow({
              height: Ti.UI.SIZE,
              layout: "vertical",
              backgroundColor: "red"
      });
      createRows(row);
      table.setData([ row ]);
      win.add(table);
          
      function createRows(row) {
      	var v1 = Ti.UI.createView({
      	        layout: "horizontal"
      	        //, height: Ti.UI.SIZE
      	});
      	var l1 = Ti.UI.createLabel({
      	        width: Ti.UI.SIZE,
      	        height: Ti.UI.SIZE,
      	        backgroundColor: 'yellow',
      	        color: 'black',
      	        text: "This is view 1",
      	        font: {
      	            fontSize: "20dp",
      	            fontFamily: "DroidSans"
      	        }        
      	});
      	v1.add(l1);
      	
      	var v2 = Ti.UI.createView({
      	        layout: "horizontal"
      	        //, height: Ti.UI.SIZE
      	});
      	var l2 = Ti.UI.createLabel({
      	        width: Ti.UI.SIZE,
      	        height: Ti.UI.SIZE,
      	        backgroundColor: 'green',
      	        color: 'black',
      	        //top: 0,
      	        text: "This is view 2",
      	        font: {
      	            fontSize: "20dp",
      	            fontFamily: "DroidSans"
      	        }
      	});
      	v2.add(l2);
      	row.add(v1);
      	row.add(v2);
      }
      win.open();
      

      Expected result:
      You should see a row with two labels

      Actual Result:
      The second child of the row is invisible.

        Attachments

          Activity

            People

            • Assignee:
              ayeung Allen Yeung
              Reporter:
              ayeung Allen Yeung
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

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

                  Git Integration