skip to Main Content

I have an app , but night mode changes colors (white to black) in Piker from @react-native-picker/picker. I tried

<item name="android:forceDarkAllowed">false</item>

and

AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO);

but it’s not helped
How to force disable night mode for Piker ?

compileSdkVersion = 31
kotlinVersion = "1.6.20"
buildToolsVersion = "30.0.2"
"react-native": "0.68.0",

2

Answers


  1. Chosen as BEST ANSWER

    This issue was related to the dark theme, from dark mode. The solution was to change in styles.xml:

    https://github.com/react-native-picker/picker/issues/274


  2. This issue was related to the dark theme, from dark mode. The solution was to change in styles.xml:

    <style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
    

    to

    <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search