Fix navigation bar transparency in some screens

This commit is contained in:
Shinokuni 2024-11-22 18:44:50 +01:00
parent 3e76597b8f
commit 640744bf6d
1 changed files with 11 additions and 1 deletions

View File

@ -8,9 +8,11 @@ import androidx.activity.ComponentActivity
import androidx.activity.SystemBarStyle
import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge
import androidx.compose.material3.BottomAppBarDefaults
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.collectAsState
import androidx.compose.runtime.getValue
import androidx.compose.ui.graphics.toArgb
import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen
import androidx.lifecycle.lifecycleScope
import cafe.adriel.voyager.core.annotation.ExperimentalVoyagerApi
@ -68,7 +70,15 @@ class MainActivity : ComponentActivity(), KoinComponent {
useDarkTheme = useDarkTheme
) {
enableEdgeToEdge(
statusBarStyle = SystemBarStyle.auto(Color.TRANSPARENT, Color.TRANSPARENT),
statusBarStyle = SystemBarStyle.auto(
lightScrim = Color.TRANSPARENT,
darkScrim = Color.TRANSPARENT,
detectDarkMode = { useDarkTheme }
),
navigationBarStyle = SystemBarStyle.light(
scrim = BottomAppBarDefaults.containerColor.toArgb(),
darkScrim = BottomAppBarDefaults.containerColor.toArgb()
)
)
Navigator(