wix / react-native-navigation

A complete native navigation solution for React Native
https://wix.github.io/react-native-navigation/
MIT License
13.01k stars 2.68k forks source link

Android is not following the Appearance API from react-native #7872

Open MaxKanngard opened 2 months ago

MaxKanngard commented 2 months ago

What happened?

When using setColorScheme from the Appearance coming from react-native ex: Appearance.setColorScheme('dark'). The color scheme is not getting updated according to the configs dark/light mode, if the config looks ex:

      bottomTabs: {
        options: {
          bottomTabs: {
            testID: testIDs.MAIN_BOTTOM_TABS,
            backgroundColor:{ light: '#ffffff', dark: '#0000ff' } ,
          },
        },

What was the expected behaviour?

When Appearance.setColorScheme('dark' | 'light' | null) is called the correct color should be used coming from the config.

Was it tested on latest react-native-navigation?

Help us reproduce this issue!

Download forked project: https://github.com/MaxKanngard/react-native-navigation Install and run playground Open in iOS bottomTabs backgroundColor is blue. Open in Android bottomTabs is backgroundColor NOT be blue.

When click on Setting to light bottomTabs backgroundColor will update on iOS but not on Android

In what environment did this happen?

React Native Navigation version: 7.39.1 React Native version: 0.73.3 Has Fabric (React Native's new rendering system) enabled: no Node version: 18.18.2 Device model: Android version:

firasath-virtus commented 2 months ago

How to set the android navigation for .kt file I have an issue to start the project for android react native 0.73.6 and its work fine for ios but not for android