[TIMOB-27637] Android: Label highlightedColor property does not work with TableViewRow
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Open |
Resolution | Unresolved |
Affected Version/s | Release 8.2.1, Release 8.3.0 |
Fix Version/s | n/a |
Components | Android |
Labels | android, engSchedule, highlightedColor, label, regression, tableviewrow |
Reporter | Sohail Saddique |
Assignee | Unknown |
Created | 2019-11-28T11:09:53.000+0000 |
Updated | 2019-12-03T09:45:38.000+0000 |
Description
When using a Label inside a TableViewRow, the highlightedColor property does not work on Android. It works fine on iOS.
*Test Case*
1. Create a new classic app
2. Copy and paste the code below into your app.js
3. Run the app on iOS and Android (any recent SDK version)
4. Long press any row on both platforms. You can see the text colour changes to blue on iOS.
*Code*
var win = Ti.UI.createWindow({
backgroundColor: Ti.Platform.osname === 'android' ? 'gray' : 'white',
title: "TIMOB-27637"
});
var navWin = Titanium.UI.createNavigationWindow({
window: win
});
var data = [ "Apples", "Bananas", "Carrots", "Potatoes", "Cod", "Haddock", "Milk", "Bread", "Eggs" ];
var table_data = [];
table_data.push(Ti.UI.createTableViewSection({ headerTitle: 'Table with rows as label' }));
for(var i=0,j=data.length; i<j; i++){
var row = Titanium.UI.createTableViewRow({});
var row_label = Titanium.UI.createLabel({
text: data[i],
textAlign: Ti.UI.TEXT_ALIGNMENT_LEFT,
width: Ti.UI.SIZE,
height: Ti.UI.SIZE,
left: 10,
top: 20,
bottom: 20,
font: {fontSize: "16dp"},
highlightedColor: "blue"
});
row.add(row_label);
table_data.push(row);
};
var table = Ti.UI.createTableView({
data: table_data
});
win.add(table);
navWin.open();
*Actual Result*
On Android, the text colour does not change to blue.
*Expected Result*
The text colour should be blue when highlighted, on Android.
No comments