[TIMOB-2208] android regression: row.background dynamic changing fails
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T01:58:25.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.6.0 M06 |
Components | Android |
Labels | android, android_refactor, backgroundcolor, defect, regression, release-1.6.0 |
Reporter | Robby |
Assignee | Don Thorp |
Created | 2011-04-15T03:13:32.000+0000 |
Updated | 2011-04-17T01:58:25.000+0000 |
Description
On the 1.5.0 build from today, creating a row with .backgroundColor set works properly, however changing .backgroundColor on the fly (e.g. after the row has been created and rendered) fails. Works on iOS and Android under 1.4.1.
Comments
- Don Thorp 2011-04-15
Robby,
Would you mind checking against 1_4_X branch to see if it regressed after that?
- Robby 2011-04-15
Don,
Works on the 1_4_X nightly from Oct 15th at least. I can try a newer one if you need.
- Don Thorp 2011-04-15
Perfect! Thanks.
- Robby 2011-04-15
Currently I am having to do a setData([]), followed by a setData(rowData) to properly see the updated colors. Less than optimal, but it should prove that it is a redraw issue or some sort.
- Don Thorp 2011-04-15
Robby. Please provide the information from the version.txt file in the mobilesdk so we know which build you're testing with.
- Robby 2011-04-15
Don, please see my comment for #2430, which includes that information along with a working testcase for this bug.
- Robby 2011-04-15
Looks like this may affect the iOS 1.5.1 release as well. Having the same kind of issues there changing it dynamically on a tableview row. Scrolling the row out and back in view redraws it with the proper backgroundColor.
- Chris Reed 2011-04-15
Hi there, in case it helps.
I've noticed the same issue in iOS with some labels properties, when added to a tableview row:
Changing label.text works, but with label.width set to 'auto', the width doesn't change with the new text length - Until the row is pushed out of view.
(I'm certain this was OK in 1.4.3, first saw it in 1.5.0 RC2)
I recorded details and some sample code in Helpdesk:
https://developer.appcelerator.com/helpdesk/view/63151">https://developer.appcelerator.com/helpdesk/view/63151 - Marshall Culpepper 2011-04-15
- Marshall Culpepper 2011-04-15
test i used to verify this fix:
var row = Ti.UI.createTableViewRow({ backgroundColor: 'blue' }); var data = [ row ]; var table = Ti.UI.createTableView({ data: data, height: '80%' }); win.add(table); var button = Ti.UI.createButton({ title: 'change bg', top: '85%' }); win.add(button); button.addEventListener("click", function(e) { row.backgroundColor = "red"; });
- Opie Cyrus 2011-04-15
Verified but needed to set the table view height to a manual height value in order to run test.