File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
kotlin/li/songe/gkd/ui/style Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ import androidx.compose.runtime.getValue
2020import androidx.compose.runtime.remember
2121import androidx.compose.runtime.rememberCoroutineScope
2222import androidx.compose.ui.graphics.Color
23+ import androidx.compose.ui.graphics.toArgb
2324import androidx.core.view.WindowInsetsControllerCompat
2425import kotlinx.coroutines.flow.MutableStateFlow
2526import kotlinx.coroutines.flow.SharingStarted
@@ -72,6 +73,10 @@ fun AppTheme(
7273 isAppearanceLightStatusBars = ! darkTheme
7374 }
7475 }
76+ val bg = colorScheme.background.toArgb()
77+ LaunchedEffect (darkTheme, bg) {
78+ activity.window.decorView.setBackgroundColor(bg)
79+ }
7580 }
7681
7782 val isTalkbackEnabledFlow = remember {
Original file line number Diff line number Diff line change 11<resources >
22
3- <style name =" AppTheme" parent =" android:Theme.Material.Light.NoActionBar" />
3+ <style name =" AppTheme" parent =" android:Theme.Material.Light.NoActionBar" >
4+ <item name =" android:windowBackground" >@android:color/transparent</item >
5+ </style >
46
57 <style name =" SplashScreenTheme" parent =" Theme.SplashScreen" >
68 <item name =" windowSplashScreenAnimatedIcon" >
You can’t perform that action at this time.
0 commit comments