diff --git a/app/src/main/java/org/schabi/newpipe/settings/AppearanceSettingsFragment.java b/app/src/main/java/org/schabi/newpipe/settings/AppearanceSettingsFragment.java
index 550d64d06..72ce0f201 100644
--- a/app/src/main/java/org/schabi/newpipe/settings/AppearanceSettingsFragment.java
+++ b/app/src/main/java/org/schabi/newpipe/settings/AppearanceSettingsFragment.java
@@ -44,7 +44,12 @@ public class AppearanceSettingsFragment extends BasePreferenceFragment {
return false;
});
} else {
- removePreference(nightThemeKey);
+ // disable the night theme selection
+ final Preference preference = findPreference(nightThemeKey);
+ if (preference != null) {
+ preference.setEnabled(false);
+ preference.setSummary(getString(R.string.night_theme_available));
+ }
}
}
@@ -61,13 +66,6 @@ public class AppearanceSettingsFragment extends BasePreferenceFragment {
return super.onPreferenceTreeClick(preference);
}
- private void removePreference(final String preferenceKey) {
- final Preference preference = findPreference(preferenceKey);
- if (preference != null) {
- getPreferenceScreen().removePreference(preference);
- }
- }
-
private void applyThemeChange(final String beginningThemeKey,
final String themeKey,
final Object newValue) {
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 3fa37155a..68f5f67a4 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -714,6 +714,7 @@
Automatic (device theme)
Select your favorite night theme — %s
You can select your favorite night theme below
+ This option is only available if Automatic (Device Theme) is selected for Theme
Download has started
You can now select text inside the description. Note that the page may flicker and links may not be clickable while in selection mode.
Enable selecting text in the description