Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-15049] Android: TableView row UI is not getting updated if table or row have height set to Ti.UI.SIZE

GitHub Issuen/a
TypeBug
PriorityLow
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 3.1.1, Release 3.1.2, Release 3.1.3, Release 3.2.0, Release 3.2.1
Fix Version/sn/a
ComponentsAndroid
Labelsandroid, engSchedule, mobilesdk, supportTeam, titanium
ReporterAshish Nigam
AssigneeAshraf Abu
Created2013-09-05T13:06:05.000+0000
Updated2019-04-09T15:35:48.000+0000

Description

Description of the problem

When trying to update a label inside a TableViewRow, if the row (or the table itself) have height set to Ti.UI.SIZE, the text of the label cannot be changed.

Steps to reproduce

Use the following code; clicking on a window it should update the text of the row itself to 'After...', but this only works once.
var win = Ti.UI.createWindow({
	backgroundColor : 'black'
});

var table = Titanium.UI.createTableView({
	// COMMENT THE NEXT LINE AND EVERYTHING WORKS
	height : Ti.UI.SIZE
});

function addRow(ii) {
	var row = Titanium.UI.createTableViewRow({
		width : '100%',
		height : 100
	});

	var label = Ti.UI.createLabel({
		text : 'Before ' + ii
	});

	row.add(label);

	row.openDetails = function(e) {
		alert(label.text);
		label.text = 'After ' + ii;
	};

	return row;
}

var rows = [];
for (var i = 0; i < 10; i++) {
	rows.push(addRow(i));
}

table.setData(rows);

table.addEventListener('click', function(e) {
	e.row.openDetails();
});

win.add(table);

win.open();
Same code works fine with SDK 3.1.0

Attachments

FileDateSize
tablechild.zip2013-09-05T13:06:05.000+0000295474

Comments

  1. Abdiel Aviles 2015-12-15

    Created almost 3 years ago.... still a problem.

JSON Source