Skip to content

FocusAwareStatusBar not changing bg color on Android (emulator) according to theme #418

Open
@harrisonchan

Description

@harrisonchan

Summary:

SystemBars from react-native-edge-to-edge (FocusAwareStatusBar) is indeed able to follow the theme with its text colors, because it changes according to Appearance. However, it is NOT able to change background color, resulting in light theme having a white background with white text. (Or any other background color for that matter. For example, if we change the theme to dark, then reload the app, because the splash screen is gray, the bg color for status bar changes to gray. In any case, this being uncontrolled can be troublesome)

To fix this, we have to change root view bg color by calling SystemUI.setBackgroundColorAsync("black"); (or any other color) from expo-system-ui. (expo system ui docs)
This successfully changes the bg color of the status bar.

Steps to reproduce:

  • Initiate bare obytes app.
  • Change theme color
    Tested on 3 different API 35 emulators ONLY on M3 Air with same results. iOS works fine for both simulator and device.

Expected behavior:

  • Status bar background color should also change to the right color

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions