Skip to content

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

Open
@MaxKanngard

Description

@MaxKanngard

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?

  • I have tested this issue on the latest react-native-navigation release and it still reproduces.

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:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions