-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
Description
I think there is a possible bug with Android Picker control where the Picker title colour, initially appears grey when the Picker.TitleColor property is set to same colour value as Picker.TextColor property.
The following screenshot shows the issue:
Two Picker controls were added to the MainPage.xaml of the default MAUI project that is created when selecting a new MAUI project:
The 1st Picker control has the TitleColor property set to the same color value as the TextColor property, which in this case, is Green.
When the program is run for the Android platform, the 1st Picker control's Title is grey and not green as you would expect.
The 2nd Picker control has the TitleColor property set to a different color value than the TextColor property, which in this case, is Green for the TitleColor property and Red for the TextColor property.
When the program is run for the Android platform, the 2nd Picker control's Title is green as you would expect.
Steps to Reproduce
- Create a new MAUI project using the default project template.
- Add two Picker controls to MainPage.xaml.
- On the 1st Picker control, explicitly set both TitleColor and TextColor to the same color value. I selected Green for this demo.
- On the 2ndPicker control, explicitly set the TitleColor to a different color value than the value of the TextColor. I selected Green for the TitleColor property and Red for the TextColor property for this demo.
- Select an Android Emulator. I selected one for API 26.
- Run the application and you should see the1st Picker control's Title is grey and not green!. Whereas, the 2nd Picker control's Title is green as you would expect.
Link to public reproduction project repository
https://github.com/AllieMash/MauiPickerColorBugDemo
Version with bug
7.0.92
Is this a regression from previous behavior?
No, this is something new
Last version that worked well
7.0.86
Affected platforms
Android, I was not able test on other platforms
Affected platform versions
Android 7.0 API 24 and above
Did you find any workaround?
If you need both TitleColor and TextColor to visually appear the same colour, you could change the value of one of these colour properties, by a very small amount so the visual difference in colour is hardly perceptible.
For example you could set the TitleColor and TextColor properties to the following values so the Picker title will appear green as required:
TitleColor="#8000" TextColor="#8001"
However this can become a hassle in some projects where you have a colour already pre-set for a specific purpose (i.e. Themes) since you my need to define and extra color specifically for use with the Picker control on the Android platform.
It would be nice to have this issue corrected.
Relevant log output
No log output