Home > Blockchain >  Color automatically change with mobile darkmode
Color automatically change with mobile darkmode

Time:01-09

Can someone tell me why my color in Xamarin.Forms application changes if the target device has dark mode enabled. here is my code :

<Setter Property="BackgroundColor" Value="{ AppThemeBinding Dark=#99f2c8}" />

and AppShell.xaml I set FlyoutBackgroundColor to #ffff

When my device is on light mode, we will see something like this :

enter image description here

and if it be on the dark mode we will see : enter image description here

my color will automatically come to dark. how I can prevent it?

CodePudding user response:

Do you have Xiaomi by any chance?

When you enable the Dark Mode, a new menu appears: "More Dark mode options". There you can switch off "Adjust text and backgrounds automatically" to resolve the issue.

As far as I know Yoy cannot control these extra settings in Xamarin so as most of users won't be impacted.

  •  Tags:  
  • Related