Problem
HighlightedColor property on android does not function similar to iOS implementation. This functionality should be native in android as well, as can be seen in the native settings app. When a row is pressed, the text color changes.
Test case
var win = Ti.UI.createWindow({
backgroundColor: 'black'
});
win.open();
var rows = [];
for (var i = 0; i < 4; i++) {
var tr = Ti.UI.createTableViewRow({height: 70});
var l = Ti.UI.createLabel({
highlightedColor: 'red',
text: 'Label ' + i + " xxxxxxxxxxxxxxxxxxxxxx",
top: 0,
bottom: 0,
left: 10,
right: 10 });
tr.add(l);
rows.push(tr);
}
var tv = Ti.UI.createTableView({
data: rows
});
win.add(tv);
The problem can reproduce with version 3.0.2 and master release 3.1.0 Tested on: Titanium Studio, build: 2.1.2.201208301612 Titanium SDK version: 3.1.0 (02/03/2013) Titanium SDK version: 3.0.2 (02/03/2013) Device: Samsung galaxy s duos Android version: 4.0.4 It works fine on ios as expected.
In Android row highlight is not done through control highlightedcolor. Use the 'backgroundSelectedColor' property of the row to set this. You may also want to set 'touchEnabled' to false on the label so that the highlight works even touching on the label.
backgoundSelectedColor changes the BACKGROUND color, not the text. the proposed solution has nothing to do with the original ticket which is to change the TEXT color when the row or view is clicked. I guess ticket won't be looked at further since it's been resolved :(
I am able to reproduce this issue with the following environment; Pixel (7.1) Studio 4.9.0.201705302345 Ti SDK 6.1.1 GA Appc NPM 4.2.9 Appc CLI 6.2.2 Ti CLI 5.0.14 Alloy 1.9.11 Xcode 8.2 (8C38) Node v4.8.2 Java 1.8.0_131