When I change my mobile theme from light to dark it is affecting the background color of my react native app. I just want it to always remain white but it changes white to black when I change my mobile theme from light to dark. I have found a solution for React Native without Expo: React native android dark mode issue but I cannot use it because I don't have Android
folder.
CodePudding user response:
Add "userInterfaceStyle" : "light"
in app.json / app.config.js
light (restrict app to support light theme only)
If this key is absent, the app will default to the light style.
Example app.json configuration:
{
"expo": {
"userInterfaceStyle": "automatic",
"ios": {
"userInterfaceStyle": "dark"
},
"android": {
"userInterfaceStyle": "light"
}
}
}