Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3b1581a2 authored by Jonathan Klee's avatar Jonathan Klee
Browse files

Set status bar theme programatically

parent 78bf83ac
Loading
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -37,11 +37,19 @@ class MainSettingsActivity : AppCompatActivity() {

        val isLightMode = isSystemInLightMode()
        if (isLightMode) {
            insetsController.setSystemBarsAppearance(
                WindowInsetsController.APPEARANCE_LIGHT_STATUS_BARS,
                WindowInsetsController.APPEARANCE_LIGHT_STATUS_BARS
            )
            insetsController.setSystemBarsAppearance(
                WindowInsetsController.APPEARANCE_LIGHT_NAVIGATION_BARS,
                WindowInsetsController.APPEARANCE_LIGHT_NAVIGATION_BARS
            )
        } else {
            insetsController.setSystemBarsAppearance(
                0,
                WindowInsetsController.APPEARANCE_LIGHT_STATUS_BARS
            )
            insetsController.setSystemBarsAppearance(
                0,
                WindowInsetsController.APPEARANCE_LIGHT_NAVIGATION_BARS
+0 −1
Original line number Diff line number Diff line
@@ -49,7 +49,6 @@
        <item name="android:divider">@color/e_divider_color</item>
        <item name="android:navigationBarColor">@android:color/transparent</item>
        <item name="android:statusBarColor">@color/e_background</item>
        <item name="android:windowLightStatusBar">?attr/isLightTheme</item>
        <item name="switchStyle">@style/ETheme.Switch</item>
    </style>