diff --git a/app/src/main/java/eu/faircode/email/ActivityBase.java b/app/src/main/java/eu/faircode/email/ActivityBase.java
index cfdabc92fe..5310ac7cff 100644
--- a/app/src/main/java/eu/faircode/email/ActivityBase.java
+++ b/app/src/main/java/eu/faircode/email/ActivityBase.java
@@ -25,9 +25,12 @@ import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.res.Configuration;
+import android.os.Build;
import android.os.Bundle;
import android.os.PowerManager;
import android.view.MenuItem;
+import android.view.View;
+import android.view.Window;
import android.view.WindowManager;
import android.widget.Toast;
@@ -102,6 +105,16 @@ abstract class ActivityBase extends AppCompatActivity implements SharedPreferenc
else
setTheme(R.style.AppThemeGreyLight);
}
+
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
+ boolean dark = Helper.isDarkTheme(this);
+ Window window = getWindow();
+ View view = window.getDecorView();
+ int flags = view.getSystemUiVisibility();
+ if (dark)
+ flags &= ~View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR;
+ view.setSystemUiVisibility(flags);
+ }
}
prefs.registerOnSharedPreferenceChangeListener(this);
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
index e9d51fa71c..4c5f33f986 100644
--- a/app/src/main/res/values/styles.xml
+++ b/app/src/main/res/values/styles.xml
@@ -70,6 +70,8 @@
- dark
- true
+ - @color/black
+
- @color/darkPrimary
- @color/darkPrimaryDark
- @color/colorAccent