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. Android version 10 React native version 0.61.5 React version 16.9.0
2 Answers
0
votes
0
votes
You can disable force dark mode in android by adding this line in your styles.xml in your android folder
<item name="android:forceDarkAllowed">false</item>
Like this
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
<!-- Customize your theme here. -->
<item name="android:forceDarkAllowed">false</item>
<item name="android:textColor">#000000</item>
</style>
</resources>