My app's UI is designed to use in light mode. But if the phone's default theme is dark mode, my app also switches to dark mode and the UI looks trash. So I want force my app to use light mode. How can I do this?
In my app.xaml file I used UserAppTheme="Light", set Content page's background color to variant white color (ex. #FFF, #F2F3F4) but still it doesn't works.
I even tried applying <style name="MainTheme.Base" parent="Theme.AppCompat.Light.DarkActionBar"> in styles.xml. But if the phone is in the dark mode, all the white like area becomes dark too.
I tested in MIUI 12.
iOS update your info.plist:
<key>UIUserInterfaceStyle</key>
<string>Light</string>
Android change the style of MainTheme.Base to DayNight:
<style name="MainTheme.Base" parent="Theme.AppCompat.DayNight.DarkActionBar">
Original answer & more detail from James Montemagno blog
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With