Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android]: Picker control's underline below the title doesn't respect forced light mode #22953

Open
RedZone908 opened this issue Jun 10, 2024 · 3 comments
Labels
area-controls-picker Picker platform/android 🤖 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Milestone

Comments

@RedZone908
Copy link

RedZone908 commented Jun 10, 2024

Description

When the system is in dark mode yet light mode is forced via UserAppTheme = AppTheme.Light, the Android Picker control's line below the title remains in dark mode which leads to it being invisible amongst white backgrounds.

Note: while the title text can also ignore forced light mode, that is a separate bug, and its workaround is just setting the title and text to different colors as described here: #16737

System Light Mode

image

System Dark Mode with Forced Light Mode In-App

image

If the developer doesn't set title text--or sets the title and text colors the same in accordance with the already-discussed issue #16737--then this means that the picker would be completely invisible to the user.

After selecting an item, the underline becomes visible.

Steps to Reproduce

  1. Create a new MAUI project
  2. In App.xaml.cs,, write the constructor as follows:
public App()
{
    InitializeComponent();

    MainPage = new AppShell();

    UserAppTheme = AppTheme.Light;
}
  1. Add a picker to MainPage.xaml.cs
<Picker x:Name="picker"
            Title="Select a monkey">
    <Picker.ItemsSource>
        <x:Array Type="{x:Type x:String}">
            <x:String>Baboon</x:String>
            <x:String>Capuchin Monkey</x:String>
            <x:String>Blue Monkey</x:String>
            <x:String>Squirrel Monkey</x:String>
            <x:String>Golden Lion Tamarin</x:String>
            <x:String>Howler Monkey</x:String>
            <x:String>Japanese Macaque</x:String>
        </x:Array>
    </Picker.ItemsSource>
</Picker>
  1. In Styles.xaml, find the style for Picker and change the light mode values for TextColor and TitleColor to be different from each other in order to avoid Title colour on Android Picker, initially appears grey. #16737 (If you don't do this, then the title text itself will also be invisible which is unrelated to this bug)
  2. Set the Android phone/emulator to dark mode
  3. Run the app
  4. The picker's underline will be invisible because it is in dark mode while the rest of the app is not.

Link to public reproduction project repository

https://github.com/RedZone908/AndroidForcedLightModePickerUnderlineIssue

Version with bug

8.0.40 SR5, 8.0.3 GA, 8.0.60-ci.net8.24309.1, possibly others

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

No response

@RedZone908 RedZone908 added the t/bug Something isn't working label Jun 10, 2024
Copy link
Contributor

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@RedZone908
Copy link
Author

RedZone908 commented Jun 10, 2024

In response to the AI:

  1. Force Light theme makes certain controls not change colour #10490 seems to be predominately Windows-focused
  2. Title colour on Android Picker, initially appears grey. #16737 is a different issue and already discussed here
  3. OS system components ignore app theme #22058 is more about other components eg the picker dropdown itself
  4. [Bug] Picker Title Style Displaying Incorrectly #15139 seems to be a dupe of Title colour on Android Picker, initially appears grey. #16737 which this issue is not

However, #11849--which the AI didn't catch--seems to cover a lot of controls with app theme being disrespected on a broader scale with multiple controls so my issue here could be considered a duplicate of that one.

@ninachen03 ninachen03 added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels Jun 11, 2024
@ninachen03
Copy link

Verified this issue with Visual Studio 17.11.0 Preview 1.1 (8.0.40 & 8.0.3). Can repro on android platform with sample project

image

@jsuarezruiz jsuarezruiz added this to the Backlog milestone Jun 11, 2024
@samhouts samhouts removed s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels Jul 3, 2024
@samhouts samhouts added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-controls-picker Picker platform/android 🤖 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants