Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-6734] Android: selectedBackgroundColor - V8/Rhino, Selected row stays highlighted until you rotate the device

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionInvalid
Resolution Date2017-06-28T19:31:31.000+0000
Affected Version/sRelease 1.8.0.1
Fix Version/sn/a
ComponentsAndroid
Labelsqe-and121411, qe-new
ReporterWilson Luu
AssigneeIngo Muschenetz
Created2011-12-16T17:32:56.000+0000
Updated2017-06-28T19:31:31.000+0000

Description

Steps to reproduce: 1. Copy and run the following code:
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();
2. Click on "Create TableView" 3. Click on "The Evil Row" Result: Row stays highlighted in blue until you rotate the device. Expected: Selected row should not stay highlighted regardless of row color. Note: * Bug appears on both V8 and Rhino * Tested on Droid 1 (2.2.2) running V8/Rhino and bug does not appear on Droid 1

Comments

  1. Wilson Luu 2011-12-16

  2. Lee Morris 2017-06-28

    Closing ticket due to time passed and lack of progress over the past few years. Any problems, please file a new ticket.

JSON Source