Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-13742] Android: TableViewRows children are not visible with vertical layout

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionInvalid
Resolution Date2013-05-03T17:03:19.000+0000
Affected Version/sRelease 3.2.0
Fix Version/s2013 Sprint 09 Core, 2013 Sprint 09
ComponentsAndroid
Labelsregression
ReporterAllen Yeung
AssigneeAllen Yeung
Created2013-05-01T23:30:11.000+0000
Updated2017-03-03T22:10:25.000+0000

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.

Comments

  1. Allen Yeung 2013-05-03

    Marking as invalid. The fix in the other timob ticket actually brought the behavior to be in parity with iOS and mobile web.
  2. Lee Morris 2017-03-03

    Closing as invalid.

JSON Source