Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-2208] android regression: row.background dynamic changing fails

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T01:58:25.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.6.0 M06
ComponentsAndroid
Labelsandroid, android_refactor, backgroundcolor, defect, regression, release-1.6.0
ReporterRobby
AssigneeDon Thorp
Created2011-04-15T03:13:32.000+0000
Updated2011-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

  1. Don Thorp 2011-04-15

    Robby,

    Would you mind checking against 1_4_X branch to see if it regressed after that?

  2. 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.

  3. Don Thorp 2011-04-15

    Perfect! Thanks.

  4. 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.

  5. 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.

  6. Robby 2011-04-15

    Don, please see my comment for #2430, which includes that information along with a working testcase for this bug.

  7. 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.

  8. 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

  9. Marshall Culpepper 2011-04-15

    This was fixed in this commit:
    https://github.com/appcelerator/titanium_mobile/commit/ced322fc0662976d349a46eebe640ae1779bd1d9"> https://github.com/appcelerator/titanium_mobile/commit/ced322fc0662...

  10. 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";
        });
        
  11. Opie Cyrus 2011-04-15

    Verified but needed to set the table view height to a manual height value in order to run test.

JSON Source