Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-27637] Android: Label highlightedColor property does not work with TableViewRow

GitHub Issuen/a
TypeBug
PriorityMedium
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 8.2.1, Release 8.3.0
Fix Version/sn/a
ComponentsAndroid
Labelsandroid, engSchedule, highlightedColor, label, regression, tableviewrow
ReporterSohail Saddique
AssigneeUnknown
Created2019-11-28T11:09:53.000+0000
Updated2019-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.

Comments

No comments

JSON Source