Skip to content

Commit

Permalink
Status bar updated
Browse files Browse the repository at this point in the history
  • Loading branch information
Saifuddin53 committed Sep 23, 2024
1 parent 19c82ff commit 648eedb
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.toArgb
import androidx.compose.ui.platform.LocalView
import androidx.core.view.WindowCompat
import androidx.core.view.WindowInsetsControllerCompat

private val LightThemeColors = lightColorScheme(
primary = LightPrimary,
Expand Down Expand Up @@ -59,8 +60,8 @@ fun MifosMobileTheme(
if (!view.isInEditMode) {
SideEffect {
val window = (view.context as Activity).window
window.statusBarColor = colors.primary.toArgb()
WindowCompat.getInsetsController(window, view).isAppearanceLightStatusBars = !useDarkTheme
WindowCompat.setDecorFitsSystemWindows(window, false)
WindowInsetsControllerCompat(window, window.decorView).isAppearanceLightStatusBars = true
}
}

Expand Down

0 comments on commit 648eedb

Please sign in to comment.