[TIMOB-6437] Android: TableViewRow display does not refresh on property change
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-01-23T15:33:56.000+0000 |
Affected Version/s | Release 1.8.0.1 |
Fix Version/s | Sprint 2011-48, Release 1.8.0.1 |
Components | Android |
Labels | branch-v8, regression |
Reporter | Dustin Hyde |
Assignee | Ping Wang |
Created | 2011-12-02T13:50:02.000+0000 |
Updated | 2012-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
File | Date | Size |
---|---|---|
android.png | 2011-12-02T13:50:02.000+0000 | 24755 |
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)
Added label qe-testadded.
open to modify label
Test already exist in KS, does not need to be in modular test