Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-12996] Android: Unexpected layout when adding images and labels to TableViewRow

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2017-08-22T23:49:21.000+0000
Affected Version/sRelease 3.0.2, Release 3.1.0
Fix Version/sRelease 6.2.0
ComponentsAndroid
Labelsn/a
ReporterJamie Buckley
AssigneeJoshua Quick
Created2013-03-07T23:07:28.000+0000
Updated2017-08-22T23:50:57.000+0000

Description

When adding an imageview and labels to a tableview row with horizontal layout will push the label down to the next line instead of wrapping the text, on iOS it will correctly wrap the text. Images attached Example code:
var win = Ti.UI.createWindow({
	backgroundColor: 'white'
})

var row1 = Ti.UI.createTableViewRow({
layout: 'horizontal'
})

var image1 = Ti.UI.createImageView({
	image: 'appicon.png',
	height: '50',
	width: '50'
});
row1.add(image1);

var label1 = Ti.UI.createLabel({
	text: 'Long text is long. Long text is long. Long text is long. Long text is long. Long text is long.',
	color: 'black'
});
row1.add(label1);

var label2 = Ti.UI.createLabel({
	text: 'Long text is long. Long text is long. Long text is long. Long text is long. Long text is long.',
	color: 'gray'
})
row1.add(label2);

var tvRow = [];
tvRow.push(row1);
var tableView1 = Ti.UI.createTableView({
		top:0, bottom:0, left:0, right:0,
		separatorColor:'black',
		backgroundColor: 'white',
		data: tvRow,
});

win.add(tableView1);
win.open();

Attachments

FileDateSize
Screenshot_3_7_13_2_51_PM-3.png2013-03-07T23:07:28.000+0000239851

Comments

  1. jithinpv 2013-04-23

    Issue reproduces Tested with Titanium Studio, build: 3.0.1.201212181159 Titanium SDK version: 3.1.0 Titanium SDK version: 3.0.2 Android Emulator: Android SDK version: 2.2
  2. Abir Mukherjee 2017-08-22

    Passed FR. PR merged. Changes are seen in SDK versions: 6.2.0.v20170822113609 7.0.0.v20170822142802

JSON Source