Skip to content

Commit

Permalink
Merge pull request #235 from DroidKaigi/takahirom/fix-theme/2024-08-06
Browse files Browse the repository at this point in the history
Fix theme
  • Loading branch information
takahirom authored Aug 6, 2024
2 parents e1d15e5 + d689f08 commit 9d99241
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import androidx.compose.runtime.produceState
import androidx.compose.runtime.remember
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.toArgb
import androidx.core.view.WindowCompat
import androidx.window.layout.DisplayFeature
import androidx.window.layout.WindowInfoTracker
import dagger.hilt.android.AndroidEntryPoint
Expand Down Expand Up @@ -61,6 +62,8 @@ class MainActivity : ComponentActivity() {
}
}

WindowCompat.getInsetsController(window, window.decorView)
.isAppearanceLightStatusBars = false
setContent {
val windowSize = calculateWindowSizeClass()
val displayFeatures = calculateDisplayFeatures(this)
Expand Down
4 changes: 2 additions & 2 deletions app-android/src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>

<style name="Theme.KaigiApp" parent="android:Theme.Material.Light.NoActionBar">
<style name="Theme.KaigiApp" parent="android:Theme.Material.NoActionBar">
<item name="android:statusBarColor">@android:color/transparent</item>
</style>
</resources>
</resources>
Original file line number Diff line number Diff line change
Expand Up @@ -241,14 +241,6 @@ fun KaigiTheme(
@Composable () -> Unit,
) {
val colorScheme = darkScheme
// val view = LocalView.current
// if (!view.isInEditMode) {
// SideEffect {
// val window = (view.context as Activity).window
// window.statusBarColor = colorScheme.primary.toArgb()
// WindowCompat.getInsetsController(window, view).isAppearanceLightStatusBars = darkTheme
// }
// }

MaterialTheme(
colorScheme = colorScheme,
Expand Down

0 comments on commit 9d99241

Please sign in to comment.