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 36d5b983..a03df07d 100644
--- a/app/src/main/java/app/fedilab/android/activities/BaseActivity.java
+++ b/app/src/main/java/app/fedilab/android/activities/BaseActivity.java
@@ -49,7 +49,6 @@ public class BaseActivity extends AppCompatActivity {
//Default automatic switch
if (currentTheme.equals(getString(R.string.SET_DEFAULT_THEME))) {
-
int currentNightMode = getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK;
switch (currentNightMode) {
case Configuration.UI_MODE_NIGHT_NO:
@@ -72,6 +71,9 @@ public class BaseActivity extends AppCompatActivity {
case "SOLARIZED_DARK":
setTheme(R.style.SolarizedAppTheme);
break;
+ case "BLACK":
+ setTheme(R.style.BlackAppTheme);
+ break;
}
break;
}
@@ -93,6 +95,10 @@ public class BaseActivity extends AppCompatActivity {
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES);
setTheme(R.style.SolarizedAppTheme);
break;
+ case "BLACK":
+ AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES);
+ setTheme(R.style.BlackAppTheme);
+ break;
}
}
super.onCreate(savedInstanceState);
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 d3fbedd3..5c058f6d 100644
--- a/app/src/main/java/app/fedilab/android/activities/BaseBarActivity.java
+++ b/app/src/main/java/app/fedilab/android/activities/BaseBarActivity.java
@@ -70,6 +70,9 @@ public class BaseBarActivity extends AppCompatActivity {
case "SOLARIZED_DARK":
setTheme(R.style.SolarizedAppThemeBar);
break;
+ case "BLACK":
+ setTheme(R.style.BlackAppThemeBar);
+ break;
}
break;
}
@@ -92,6 +95,10 @@ public class BaseBarActivity extends AppCompatActivity {
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES);
setTheme(R.style.SolarizedAppThemeBar);
break;
+ case "BLACK":
+ AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES);
+ setTheme(R.style.BlackAppThemeBar);
+ break;
}
}
super.onCreate(savedInstanceState);
diff --git a/app/src/main/java/app/fedilab/android/ui/fragment/settings/FragmentThemingSettings.java b/app/src/main/java/app/fedilab/android/ui/fragment/settings/FragmentThemingSettings.java
index 1f96672f..019cda75 100644
--- a/app/src/main/java/app/fedilab/android/ui/fragment/settings/FragmentThemingSettings.java
+++ b/app/src/main/java/app/fedilab/android/ui/fragment/settings/FragmentThemingSettings.java
@@ -65,6 +65,7 @@ public class FragmentThemingSettings extends PreferenceFragmentCompat implements
requireActivity().recreate();
}
}
+ //TODO: check if can be removed
Helper.recreateMainActivity(requireActivity());
}
diff --git a/app/src/main/res/values-night/themes.xml b/app/src/main/res/values-night/themes.xml
index 937c1328..6a2a76ee 100644
--- a/app/src/main/res/values-night/themes.xml
+++ b/app/src/main/res/values-night/themes.xml
@@ -167,5 +167,70 @@
- @color/solarized_md_theme_dark_inversePrimary
+
+
+
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 76c059f8..b0375e43 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -702,6 +702,7 @@
- System default
- Solarized (Light)
- Solarized (Dark)
+ - Black
- LIGHT
@@ -709,6 +710,7 @@
- SYSTEM
- SOLARIZED_LIGHT
- SOLARIZED_DARK
+ - BLACK
@@ -724,10 +726,12 @@
- Dark
- Solarized (Dark)
+ - Black
- DARK
- SOLARIZED_DARK
+ - BLACK