Problem Description
I'm not able to set the text color of the picker value. Therefore, I have to use the Android theme files to set it, but this should be exposed in the API as the default
color: '#hex'
We have tested this issue. But Android, iOS have not text color property of pickerView or pickerRow.
Steps to Reproduce:
1. Create classic project.
3. Paste this code in app.js file.
3. Run this code with the testing environment.
4.
Ti.UI.backgroundColor = 'white';
var win = Ti.UI.createWindow({
exitOnClose : true,
layout : 'vertical'
});
var picker = Ti.UI.createPicker({
top : 50
});
var data = [];
data[0] = Ti.UI.createPickerRow({
title : 'Bananas',
color:'red'
});
data[1] = Ti.UI.createPickerRow({
title : 'Strawberries'
});
data[2] = Ti.UI.createPickerRow({
title : 'Mangos'
});
data[3] = Ti.UI.createPickerRow({
title : 'Grapes'
});
picker.add(data);
picker.selectionIndicator = true;
win.add(picker);
win.open();
This seems to be a pretty big deal. The picker looks OK if it has a dark background color, so that it shows white text on dark, but if you have a light background color, you can't see the text of the picker at all. Interestingly, you get the underline and triangle in the corner, like a modern Android picker. But that's in black. If you set the background to black, you can see the text, but you *can't* see the underline and the triangle. For a usable picker, we really need a lot more control over the colors of the text and the "decorators".
Please do this! It is very annoying, specially when you need more than one picker theme.
any news on that guys? Terrible to do a form and have to manage it on Android Themes =/
Reopening, as this does not work properly on android 6.0. Works as expected on android 5.1.1. Using the code in the description on android 6.0, after you dropdown & select a row, the selected row text as well as the original row text on which the color property is set will have the color red. Attached is a video of the issue : [^2016_06_30_14_17_11.mp4] Environment: Appc Studio : 4.7.0.201606220541 Ti SDK : 5.4.0.v20160630074247 Ti CLI : 5.0.9 Alloy : 1.9.0 MAC El Capitan : 10.11.5 Appc NPM : 4.2.7-2 Appc CLI : 5.4.0-23 Node: 4.4.4 Nexus 6 - Android 6.0.1
Clarification: Original PR for this was https://github.com/appcelerator/titanium_mobile/pull/7959
Due to time constraints, will be bumping this out of 5.4.0 and placing it in -6.0.0- 6.1.0 to be addressed.
I tested it on my Android 6 Galaxy S6 device. It was working for me. The text in the picker e.g. Bananas, Strawberries, etc do have text color. 3_4_1 release does not have styleTextView which is responsible for setting text color in color picker. https://github.com/appcelerator/titanium_mobile/blob/3_4_1/android/modules/ui/src/java/ti/modules/titanium/ui/widget/picker/TiUINativePicker.java#L78 This has already been addressed and merged in master. https://github.com/appcelerator/titanium_mobile/blob/master/android/modules/ui/src/java/ti/modules/titanium/ui/widget/picker/TiUINativePicker.java#L76
Reopening as I am still seeing the issue I have mentioned in my previous comment. Appc Studio : 4.8.1.201611291132 SDK Version : 6.1.0.v20161129071600 Mac OS Version : 10.12 Xcode Version : Xcode 8.1 Build version 8B62 Appc CLI AND Appc NPM : {"NPM":"4.2.9-1","CLI":"6.1.0-302"} Ti CLI : 5.0.11 Alloy : 1.9.4 Node : v4.6.0 Device: running 7.1Pixel
master: https://github.com/appcelerator/titanium_mobile/pull/8651
Reopening as now I am seeing my previous issue when
color
property is set on two of the row text. Appc Studio : 4.8.1.201612050850 SDK Version : 6.1.0.v20161205102502 Mac OS Version : 10.12 Xcode Version : Xcode 8.1 Build version 8B62 Appc CLI AND Appc NPM : {"NPM":"4.2.9-1","CLI":"6.1.0-302"} Ti CLI : 5.0.11 Alloy : 1.9.4 Node : v4.6.0 Device: running 7.1Pixelmaster: https://github.com/appcelerator/titanium_mobile/pull/8661
Verified fixed,
color
property is no longer set on two rows of text when selecting to text with no color then moving to another line of text. *Environment*