Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-19664] Windows: ListItem title color is black (should be white) and cannot be changed

GitHub Issuen/a
TypeBug
PriorityNone
StatusClosed
ResolutionFixed
Resolution Date2015-11-02T20:11:27.000+0000
Affected Version/sRelease 5.0.2
Fix Version/sRelease 5.1.0
ComponentsWindows
Labelsn/a
ReporterFokke Zandbergen
AssigneeKota Iguchi
Created2015-10-02T14:05:49.000+0000
Updated2015-11-07T00:55:14.000+0000

Description

The following sample based on the [first classic sample in the docs](http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.ListView) shows that on Windows ListItem titles default to black, which is not readable on the default black background color. It also shows that setting the color property of the ListItem doesn't work either, which is [documented](http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.ListItem-property-color) but makes the built-in templates pretty much useless.
var win = Ti.UI.createWindow({backgroundColor:'#888'});
var listView = Ti.UI.createListView();
var sections = [];

var fruitSection = Ti.UI.createListSection({ headerTitle: 'Fruits'});
var fruitDataSet = [
    {properties: { title: 'Apple', color: '#FFF'}}, // has no effect
    {properties: { title: 'Banana'}},
];
fruitSection.setItems(fruitDataSet);
sections.push(fruitSection);

var vegSection = Ti.UI.createListSection({ headerTitle: 'Vegetables'});
var vegDataSet = [
    {properties: { title: 'Carrots'}},
    {properties: { title: 'Potatoes'}},
];
vegSection.setItems(vegDataSet);
sections.push(vegSection);

listView.sections = sections;
win.add(listView);
win.open();

var fishSection = Ti.UI.createListSection({ headerTitle: 'Fish'});
var fishDataSet = [
    {properties: { title: 'Cod'}},
    {properties: { title: 'Haddock'}},
];
fishSection.setItems(fishDataSet);
listView.appendSection(fishSection);

Attachments

FileDateSize
wp_ss_20151002_0003.jpg2015-10-02T14:05:44.000+000025005

Comments

  1. Kota Iguchi 2015-10-30

    https://github.com/appcelerator/titanium_mobile_windows/pull/459
  2. Ewan Harris 2015-11-07

    Verified using: Windows 10 Pro Appc Core: 5.1.0-42 Appc NPM: 4.2.1 Ti SDK: 5.1.0.v20151104190037 Using the code provided ListItem title color is now white and the color can be changed Closing ticket

JSON Source