From 3fcb0cc6e07ae9e5989f8e39c92ea961c93e67f4 Mon Sep 17 00:00:00 2001 From: Thomas Date: Sun, 18 Dec 2022 11:38:51 +0100 Subject: [PATCH] Fix theme bar color --- .../android/activities/BaseActivity.java | 9 --------- .../android/activities/BaseBarActivity.java | 9 --------- .../activities/BaseTransparentActivity.java | 9 --------- app/src/main/res/values-night/themes.xml | 18 +++++++++++++++++- app/src/main/res/values/themes.xml | 8 ++++++++ 5 files changed, 25 insertions(+), 28 deletions(-) diff --git a/app/src/main/java/app/fedilab/android/activities/BaseActivity.java b/app/src/main/java/app/fedilab/android/activities/BaseActivity.java index e7ba4af89..2f2b870f8 100644 --- a/app/src/main/java/app/fedilab/android/activities/BaseActivity.java +++ b/app/src/main/java/app/fedilab/android/activities/BaseActivity.java @@ -19,11 +19,8 @@ import android.annotation.SuppressLint; import android.content.Context; import android.content.SharedPreferences; import android.content.res.Configuration; -import android.graphics.Color; import android.os.Build; import android.os.Bundle; -import android.view.Window; -import android.view.WindowManager; import androidx.annotation.Nullable; import androidx.appcompat.app.AppCompatActivity; @@ -84,9 +81,6 @@ public class BaseActivity extends AppCompatActivity { break; case "BLACK": setTheme(R.style.BlackAppTheme); - Window window = getWindow(); - window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); - window.setStatusBarColor(Color.BLACK); currentThemeId = R.style.BlackAppTheme; break; case "DRACULA": @@ -121,9 +115,6 @@ public class BaseActivity extends AppCompatActivity { case "BLACK": AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES); setTheme(R.style.BlackAppTheme); - Window window = getWindow(); - window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); - window.setStatusBarColor(Color.BLACK); currentThemeId = R.style.BlackAppTheme; break; case "DRACULA": diff --git a/app/src/main/java/app/fedilab/android/activities/BaseBarActivity.java b/app/src/main/java/app/fedilab/android/activities/BaseBarActivity.java index 2776d2ec2..e8f0111e4 100644 --- a/app/src/main/java/app/fedilab/android/activities/BaseBarActivity.java +++ b/app/src/main/java/app/fedilab/android/activities/BaseBarActivity.java @@ -19,11 +19,8 @@ import android.annotation.SuppressLint; import android.content.Context; import android.content.SharedPreferences; import android.content.res.Configuration; -import android.graphics.Color; import android.os.Build; import android.os.Bundle; -import android.view.Window; -import android.view.WindowManager; import androidx.annotation.Nullable; import androidx.appcompat.app.AppCompatActivity; @@ -76,9 +73,6 @@ public class BaseBarActivity extends AppCompatActivity { setTheme(R.style.SolarizedAppThemeBar); break; case "BLACK": - Window window = getWindow(); - window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); - window.setStatusBarColor(Color.BLACK); setTheme(R.style.BlackAppThemeBar); break; case "DRACULA": @@ -108,9 +102,6 @@ public class BaseBarActivity extends AppCompatActivity { break; case "BLACK": AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES); - Window window = getWindow(); - window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); - window.setStatusBarColor(Color.BLACK); setTheme(R.style.BlackAppThemeBar); break; case "DRACULA": diff --git a/app/src/main/java/app/fedilab/android/activities/BaseTransparentActivity.java b/app/src/main/java/app/fedilab/android/activities/BaseTransparentActivity.java index 0f2668649..77f2df730 100644 --- a/app/src/main/java/app/fedilab/android/activities/BaseTransparentActivity.java +++ b/app/src/main/java/app/fedilab/android/activities/BaseTransparentActivity.java @@ -19,11 +19,8 @@ import android.annotation.SuppressLint; import android.content.Context; import android.content.SharedPreferences; import android.content.res.Configuration; -import android.graphics.Color; import android.os.Build; import android.os.Bundle; -import android.view.Window; -import android.view.WindowManager; import androidx.annotation.Nullable; import androidx.appcompat.app.AppCompatActivity; @@ -76,9 +73,6 @@ public class BaseTransparentActivity extends AppCompatActivity { setTheme(R.style.TransparentSolarized); break; case "BLACK": - Window window = getWindow(); - window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); - window.setStatusBarColor(Color.BLACK); setTheme(R.style.TransparentBlack); break; case "DRACULA": @@ -108,9 +102,6 @@ public class BaseTransparentActivity extends AppCompatActivity { break; case "BLACK": AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES); - Window window = getWindow(); - window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); - window.setStatusBarColor(Color.BLACK); setTheme(R.style.TransparentBlack); break; case "DRACULA": diff --git a/app/src/main/res/values-night/themes.xml b/app/src/main/res/values-night/themes.xml index 90a50a649..62dd6db22 100644 --- a/app/src/main/res/values-night/themes.xml +++ b/app/src/main/res/values-night/themes.xml @@ -4,7 +4,7 @@