Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
harrisonchan opened this issue Dec 28, 2024 · 1 comment

Comments

@harrisonchan
Copy link

harrisonchan commented Dec 28, 2024

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
@harrisonchan harrisonchan changed the title FocusAwareStatusBar not changing bg color on emulator according to theme FocusAwareStatusBar not changing bg color on Android (emulator) according to theme Dec 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants
@harrisonchan and others