react-native-date-picker icon indicating copy to clipboard operation
react-native-date-picker copied to clipboard

Unable to force light mode

Open TimHi opened this issue 4 months ago • 0 comments

The app I'm working on does not offer a dark mode, hence I need to ignore the system set dark mode. In Android it's looking like this:

Screenshot 2024-10-21 at 13 13 22

So far I've tried to edit the styles.xml. Neither forceDarkAllowed or the timePickerDialogTheme/datePickerDialogTheme seem to. make any difference.

    <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
        <item name="android:forceDarkAllowed">false</item>
        <item name="android:spinnerItemStyle">@style/SpinnerItem</item>
        <item name="android:spinnerDropDownItemStyle">@style/SpinnerDropDownItem</item>
        <item name="android:timePickerDialogTheme">@style/DialogDatePicker.Theme</item>
        <item name="android:datePickerDialogTheme">@style/DialogDatePicker.Theme</item>
    </style>

    <style name="DialogDatePicker.Theme" parent="Theme.AppCompat.Light.NoActionBar">
        <item name="colorAccent">@color/primary_blue</item>
        <item name="android:textColor">@color/primary_dark</item>
        <item name="android:textColorPrimary">@color/colorBottomNavigationNotification</item>
    </style>

I'm on the latest version 8.2.0. Is there something I'm missing?

TimHi avatar Oct 21 '24 11:10 TimHi