Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-15210] Android: Updating data in CustomRow in TableView with height of Ti.UI.SIZE will not update height

GitHub Issuen/a
TypeBug
PriorityLow
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
ComponentsAndroid
Labelsandroid, tableview, tableviewrow
ReporterVittorio Sorbera
AssigneeUnknown
Created2013-09-14T09:49:21.000+0000
Updated2018-02-28T20:03:55.000+0000

Description

If I add a customrow in a TableView, and then I want to update data in the customrow, if the height of the TableView is expressed as Ti.UI.SIZE, the data does not update.
 
var win = Ti.UI.createWindow({
	title : "Win",
	backgroundColor : "transparent",
});
win.backgroundImage = "/KS_nav_views.png";
win.fullscreen = true;

var tv = Ti.UI.createTableView({
	top : 10,
	width : 250,
	height : Ti.UI.SIZE, // 100% done
});

var row = Ti.UI.createTableViewRow();
var leftImage = Ti.UI.createImageView({
	left : 5,
	width : 50,
	height : 50,
	image : "/KS_nav_views.png"
});
var lbl = Ti.UI.createLabel({
	left : 60,
	right : 10,
	text : "Update Text"
});
row.add(leftImage);
row.add(lbl);
tv.appendRow(row);

row.addEventListener("click", function() {
	lbl.text = "Ok, new text!";
	leftImage.image = "/KS_nav_ui.png";	
});
	
	
win.add(tv);
win.open();
If I don't specific height as Ti.UI.SIZE, data is updated.
 
var win = Ti.UI.createWindow({
	title : "Win",
	backgroundColor : "transparent",
});
win.backgroundImage = "/KS_nav_views.png";
win.fullscreen = true;

var tv = Ti.UI.createTableView({
	top : 10,
	width : 250,
	height : 250,
});

var row = Ti.UI.createTableViewRow();
var leftImage = Ti.UI.createImageView({
	left : 5,
	width : 50,
	height : 50,
	image : "/KS_nav_views.png"
});
var lbl = Ti.UI.createLabel({
	left : 60,
	right : 10,
	text : "Update Text"
});
row.add(leftImage);
row.add(lbl);
tv.appendRow(row);

row.addEventListener("click", function() {
	lbl.text = "Ok, new text!";
	leftImage.image = "/KS_nav_ui.png";	
});
	
	
win.add(tv);
win.open();

Comments

No comments

JSON Source