[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 Issue | n/a |
|---|---|
| Type | Bug |
| Priority | High |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2011-07-15T11:07:56.000+0000 |
| Affected Version/s | Release 1.7.1 |
| Fix Version/s | Sprint 2011-28, Release 1.7.2, Release 1.8.0 |
| Components | Android |
| Labels | n/a |
| Reporter | Opie Cyrus |
| Assignee | Natalie Huynh |
| Created | 2011-06-29T16:03:18.000+0000 |
| Updated | 2011-08-25T13:12:46.000+0000 |
I made a test app.js:
* 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 havingTitanium.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();backgroundSelectedColor, you'll see that row has a title "The Evil Row". * One of the rows has a yellowbackgroundColor, that's just to check to be sure there is no weird regression with the standardbackgroundColorproperty.pull request merge
Tested with 1.8.0.v20110819142548 Motorola Xoom 3.2 Nexus One 2.2.2