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..ef0e8670c 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,13 @@ 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,
+ getString(R.string.auto_device_theme_title)));
+ }
}
}
@@ -61,13 +67,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 76b828746..4e6889304 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -716,6 +716,7 @@
Automatic (device theme)
Select your favorite night theme — %s
You can select your favorite night theme below
+ This option is only available if %s 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