Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-6437] Android: TableViewRow display does not refresh on property change

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-01-23T15:33:56.000+0000
Affected Version/sRelease 1.8.0.1
Fix Version/sSprint 2011-48, Release 1.8.0.1
ComponentsAndroid
Labelsbranch-v8, regression
ReporterDustin Hyde
AssigneePing Wang
Created2011-12-02T13:50:02.000+0000
Updated2012-01-23T15:33:56.000+0000

Description

TableViewRow display does not refresh on property change. To refresh the row, you must cause the refresh yourself (i.e., scroll up and down a few times). This affects Rhino and V8 in 1.8.0.1. This does not happen in 1.7.5 or iOS. Steps to Reproduce: 1. Run the following code in a new app.
var win = Titanium.UI.createWindow();
win.backgroundColor = '#000099';
var data = [];
data[0] = Ti.UI.createTableViewRow({title:'Row 1',backgroundColor:'#900'});
data[1] = Ti.UI.createTableViewRow({title:'Row 2',backgroundColor:'#fff'});
data[2] = Ti.UI.createTableViewRow({title:'Row 3',backgroundColor:'#900'});
data[3] = Ti.UI.createTableViewRow({title:'Row 4',backgroundColor:'#fff'});
var tableview = Titanium.UI.createTableView({
	data:data,
	bottom:30,
	left:20,
	right:20,
	height:178,
	borderWidth:2,
	borderRadius:10,
	borderColor:'#222'});
tableview.addEventListener('click', function(e){
	var index = e.index;
	var section = e.section;
	var row = e.row;
	var rowdata = e.rowData;
	row.hasCheck = true;
	var color = '#' + String(Math.round(Math.random()*9)) + String(Math.round(Math.random()*9)) + String(Math.round(Math.random()*9));
	row.title = "Color is now: "+color;
	row.backgroundColor = color;});
var label = Titanium.UI.createLabel({
	top:20,
	font:{fontFamily:'Helvetica Neue',fontSize:20},
	text:'Tableviews are cool',
	color:'#900',
	shadowColor:'#555',
	shadowOffset:{x:1,y:2},
	textAlign:'center',
	width:'auto',
	height:'auto'});
win.add(tableview);
win.add(label);
win.open();
2. Click on a row. Expected Result: Row should refresh with new properties (screenshot attached). Actual Result: Row does not refresh, must be manually refreshed to display property changes.

Attachments

FileDateSize
android.png2011-12-02T13:50:02.000+000024755

Comments

  1. Wilson Luu 2011-12-06

    Closing bug. Verified fix on: SDK Build: 1.8.0.1.v20111205164258 OS: Mac OS X Lion Runtime: V8, Rhino Devices: Droid 2 (2.2.2), Nexus S (2.3.6), Galaxy Tab 10.1 (3.1), Android Emulator (4.0)
  2. Dustin Hyde 2012-01-04

    Added label qe-testadded.
  3. Natalie Huynh 2012-01-23

    open to modify label
  4. Natalie Huynh 2012-01-23

    Test already exist in KS, does not need to be in modular test

JSON Source