diff --git a/android/app/src/main/kotlin/me/hgsky/synq/MainActivity.kt b/android/app/src/main/kotlin/me/hgsky/synq/MainActivity.kt index c909e7e..de2df2a 100644 --- a/android/app/src/main/kotlin/me/hgsky/synq/MainActivity.kt +++ b/android/app/src/main/kotlin/me/hgsky/synq/MainActivity.kt @@ -4,6 +4,7 @@ import android.content.Intent import android.os.Bundle import androidx.activity.ComponentActivity import androidx.activity.compose.setContent +import androidx.activity.enableEdgeToEdge import androidx.compose.runtime.Composable import androidx.navigation.NavType import androidx.navigation.compose.NavHost @@ -20,6 +21,7 @@ import java.net.URLEncoder class MainActivity : ComponentActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) + enableEdgeToEdge() val sharedText = if (intent.action == Intent.ACTION_SEND) intent.getStringExtra(Intent.EXTRA_TEXT) else null diff --git a/android/app/src/main/kotlin/me/hgsky/synq/ui/theme/Theme.kt b/android/app/src/main/kotlin/me/hgsky/synq/ui/theme/Theme.kt index ab2f24c..859b63d 100644 --- a/android/app/src/main/kotlin/me/hgsky/synq/ui/theme/Theme.kt +++ b/android/app/src/main/kotlin/me/hgsky/synq/ui/theme/Theme.kt @@ -1,14 +1,27 @@ package me.hgsky.synq.ui.theme +import android.app.Activity import androidx.compose.material3.MaterialTheme -import androidx.compose.material3.dynamicDarkColorScheme import androidx.compose.material3.dynamicLightColorScheme import androidx.compose.runtime.Composable +import androidx.compose.runtime.SideEffect import androidx.compose.ui.platform.LocalContext +import androidx.compose.ui.platform.LocalView +import androidx.core.view.WindowCompat @Composable fun SynqTheme(content: @Composable () -> Unit) { val context = LocalContext.current val colorScheme = dynamicLightColorScheme(context) + + val view = LocalView.current + if (!view.isInEditMode) { + SideEffect { + val window = (view.context as Activity).window + // light theme → dark icons so clock/battery/wifi are visible on light TopAppBar + WindowCompat.getInsetsController(window, view).isAppearanceLightStatusBars = true + } + } + MaterialTheme(colorScheme = colorScheme, content = content) }