-
Notifications
You must be signed in to change notification settings - Fork 25.1k
Description
Hello people,
I'm learning react / react native and along, making an app to practice. What is happening is that when the device's darkmode is active it implies the colors chosen in the application (an example below). I do not intend to invest time in and do darkmode now, I would like to learn more about React, make the whole app, and then go to the more "superficial" parts and make darkmode within the config of the app itself.
Would it be possible to inhibit / prevent the device's Dark Mode from interfering with the colors of the app?
It's done with my app design 😥
I'm testing the app on a Xiaomi Mi 9T Pro, I also tested it on the S10 + and it didn't happen, it seems that MiUI forces DarkMode ...
Thank you.
React Native version:
"react": "16.11.0",
"react-native": "0.62.2",
Possible solutions that I was unable to make work.
I found the following code below talking to put in the onCreate method of MainActivity.java, however it does not have this method there. I don't know where and how I can do it.
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO)
