titanium sdk: 2.1.1 os: mac os platfrom: iphone simulator 5.1
when the table row has a horizontal layout and the child view in it has a percentage width, the child view is not shown, take a look of the following code, button is presented, but the leftview is not:
var row = Ti.UI.createTableViewRow({ top:5, bottom:5, height : 60, width: Ti.UI.FILL, layout : 'horizontal', selectionStyle: 'none' }); var leftView = Ti.UI.createView({ left : 0, width : '75%', height : 50, layout : 'horizontal', backgroundColor:'red' }) var button = Ti.UI.createButton({ title : 'Button', left : 0, //top : '20%', height : 30, backgroundColor : '#104E8B', color : '#FFFFF0', font : { fontSize : 14 }, style: Ti.UI.iPhone.SystemButtonStyle.PLAIN }); row.add(leftView); row.add(button); tableView.appendRow(row);
1 Answer
Accepted Answer
The TableViewRow only takes one view to display. If you want to make a complex row, wrap everything in a single view, then add that view to the row.
Your Answer
Think you can help? Login to answer this question!