Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-4528] Android: 3.0 Xoom. When selectedBackgroundColor is set, the other rows in a table view remain "stuck" in the highlight color when you touch them.

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2011-07-15T11:07:56.000+0000
Affected Version/sRelease 1.7.1
Fix Version/sSprint 2011-28, Release 1.7.2, Release 1.8.0
ComponentsAndroid
Labelsn/a
ReporterOpie Cyrus
AssigneeNatalie Huynh
Created2011-06-29T16:03:18.000+0000
Updated2011-08-25T13:12:46.000+0000

Description

Comments

  1. Bill Dawson 2011-07-13

    I made a test app.js:
       Titanium.UI.setBackgroundColor('#000');
       var win = Titanium.UI.createWindow({  
           title:'Test',
           backgroundColor:'#000',
       	exitOnClose: true
       });
       
       var cb, btn;
       var tv = null;
       win.add(cb = Ti.UI.createSwitch({
       	value: true,
       	style: Ti.UI.Android.SWITCH_STYLE_CHECKBOX,
       	title: "Give one row backgroundSelectedColor",
       	top: "5dp", left: "5dp", right: "5dp", height: "60dp"
       }));
       win.add(btn = Ti.UI.createButton({
       	title: "Create TableView",
       	top: "65dp", left: "5dp", width: "200dp", height: "40dp"
       }));
       btn.addEventListener('click', function(e) {
       	if (tv !== null) {
       		win.remove(tv);
       	}
       	win.add(tv = Ti.UI.createTableView({
       		top: "110dp", left: "0dp", right: "0dp", bottom: "0dp"
       	}));
       
       
       	var rows = [];
       	for (var i = 0; i < 10; i++) {
       		var row = Ti.UI.createTableViewRow();
       		row.title = "Row " + (i + 1);
       		if (i === 5 && cb.value) {
       			row.title = "The Evil Row";
       			row.backgroundSelectedColor = "blue";
       		}
       		if (i === 8) {
       			// Just testing standard background
       			row.backgroundColor = "yellow";
       			row.title = "I am yellow";
       		}
       		rows.push(row);
       	}
       	tv.setData(rows);
       });
       
       
       win.open();
       
    * To test the failcase, make sure the "Give one row backgroundSelectedColor" is checked, then click Create TableView. * To test that there is no regression in the case that no row has a backgroundSelectedColor, un-check that box and again click Create TableView. * When you create the tableview with a row having backgroundSelectedColor, you'll see that row has a title "The Evil Row". * One of the rows has a yellow backgroundColor, that's just to check to be sure there is no weird regression with the standard backgroundColor property.
  2. Marshall Culpepper 2011-07-15

    pull request merge
  3. Natalie Huynh 2011-08-25

    Tested with 1.8.0.v20110819142548 Motorola Xoom 3.2 Nexus One 2.2.2

JSON Source