diff options
author | daniel oeh <daniel.oeh@gmail.com> | 2013-03-25 10:56:27 +0100 |
---|---|---|
committer | daniel oeh <daniel.oeh@gmail.com> | 2013-03-25 10:56:27 +0100 |
commit | ab6b4a4e3b904e0fe708ee81198dfe394b8cc6a3 (patch) | |
tree | eda44bab311169df13c7968dc6d4272438e10038 /src | |
parent | 0da8b0acc9b953f09a50918e9753c625bd8f1d1e (diff) | |
download | AntennaPod-ab6b4a4e3b904e0fe708ee81198dfe394b8cc6a3.zip |
Added workaround for PreferenceScreen bug
http://code.google.com/p/android/issues/detail?id=4611
Diffstat (limited to 'src')
-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; + } } |