diff options
-rw-r--r-- | src/de/danoeh/antennapod/activity/PreferenceActivity.java | 38 |
1 files changed, 29 insertions, 9 deletions
diff --git a/src/de/danoeh/antennapod/activity/PreferenceActivity.java b/src/de/danoeh/antennapod/activity/PreferenceActivity.java index b7e000785..994cd2df6 100644 --- a/src/de/danoeh/antennapod/activity/PreferenceActivity.java +++ b/src/de/danoeh/antennapod/activity/PreferenceActivity.java @@ -157,15 +157,16 @@ public class PreferenceActivity extends SherlockPreferenceActivity { return true; } }); - findPreference(UserPreferences.PREF_ENABLE_AUTODL).setOnPreferenceClickListener(new OnPreferenceClickListener() { - - @Override - public boolean onPreferenceClick(Preference preference) { - checkItemVisibility(); - return true; - } - }); - + findPreference(UserPreferences.PREF_ENABLE_AUTODL) + .setOnPreferenceClickListener(new OnPreferenceClickListener() { + + @Override + public boolean onPreferenceClick(Preference preference) { + checkItemVisibility(); + return true; + } + }); + buildAutodownloadSelectedNetworsPreference(); setSelectedNetworksEnabled(UserPreferences .isEnableAutodownloadWifiFilter()); @@ -330,4 +331,23 @@ public class PreferenceActivity extends SherlockPreferenceActivity { } } } + + @SuppressWarnings("deprecation") + @Override + public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, + Preference preference) { + super.onPreferenceTreeClick(preferenceScreen, preference); + if (preference != null) + if (preference instanceof PreferenceScreen) + if (((PreferenceScreen) preference).getDialog() != null) + ((PreferenceScreen) preference) + .getDialog() + .getWindow() + .getDecorView() + .setBackgroundDrawable( + this.getWindow().getDecorView() + .getBackground().getConstantState() + .newDrawable()); + return false; + } } |