You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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
Summary:
SystemBars from
react-native-edge-to-edge
(FocusAwareStatusBar) is indeed able to follow the theme with its text colors, because it changes according toAppearance
. 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) fromexpo-system-ui
. (expo system ui docs)This successfully changes the bg color of the status bar.
Steps to reproduce:
Tested on 3 different API 35 emulators ONLY on M3 Air with same results. iOS works fine for both simulator and device.
Expected behavior:
The text was updated successfully, but these errors were encountered: