Skip to content

⚡️⚡️⚡️ Self-hosted collaborative bookmark manager to collect, read, annotate, and fully preserve what matters, all in one place.

fix(mobile): apply dark mode to android statusbar

daniel31x13bc129af07a04
diff --git a/apps/mobile/android/app/src/main/res/values/styles.xml b/apps/mobile/android/app/src/main/res/values/styles.xml
index dcdd305a..d4276ae4 100644
--- a/apps/mobile/android/app/src/main/res/values/styles.xml
+++ b/apps/mobile/android/app/src/main/res/values/styles.xml
@@ -4,7 +4,7 @@
<item name="android:editTextStyle">@style/ResetEditText</item>
<item name="android:editTextBackground">@drawable/rn_edit_text_material</item>
<item name="colorPrimary">@color/colorPrimary</item>
- <item name="android:statusBarColor">#ffffff</item>
+ <item name="android:statusBarColor">@android:color/transparent</item>
<item name="android:navigationBarColor">@android:color/transparent</item>
</style>
<style name="ResetEditText" parent="@android:style/Widget.EditText">
diff --git a/apps/mobile/app/_layout.tsx b/apps/mobile/app/_layout.tsx
index 8fd43dce..45b3496d 100644
--- a/apps/mobile/app/_layout.tsx
+++ b/apps/mobile/app/_layout.tsx
@@ -10,6 +10,7 @@ import { useColorScheme } from "nativewind";
import { lightTheme, darkTheme } from "../lib/theme";
import { Platform, View } from "react-native";
import { rawTheme, ThemeName } from "@/lib/colors";
+import { StatusBar } from "expo-status-bar";
const queryClient = new QueryClient({
defaultOptions: {
@@ -44,12 +45,18 @@ export default function RootLayout() {
screenOptions={{
navigationBarColor:
rawTheme[colorScheme as ThemeName]["base-100"],
- statusBarStyle: Platform.OS === "android" ? "dark" : undefined,
headerShown: false,
contentStyle: {
backgroundColor:
rawTheme[colorScheme as ThemeName]["base-100"],
},
+ ...Platform.select({
+ android: {
+ statusBarStyle: colorScheme === "dark" ? "light" : "dark",
+ statusBarBackgroundColor:
+ rawTheme[colorScheme as ThemeName]["base-100"],
+ },
+ }),
}}
>
{/* <Stack.Screen name="(tabs)" /> */}