| OLD | NEW |
| 1 /* | 1 /* |
| 2 * This file is part of the Adblock Plus, | 2 * This file is part of the Adblock Plus, |
| 3 * Copyright (C) 2006-2012 Eyeo GmbH | 3 * Copyright (C) 2006-2012 Eyeo GmbH |
| 4 * | 4 * |
| 5 * Adblock Plus is free software: you can redistribute it and/or modify | 5 * Adblock Plus is free software: you can redistribute it and/or modify |
| 6 * it under the terms of the GNU General Public License version 3 as | 6 * it under the terms of the GNU General Public License version 3 as |
| 7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
| 8 * | 8 * |
| 9 * Adblock Plus is distributed in the hope that it will be useful, | 9 * Adblock Plus is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 * GNU General Public License for more details. | 12 * GNU General Public License for more details. |
| 13 * | 13 * |
| 14 * You should have received a copy of the GNU General Public License | 14 * You should have received a copy of the GNU General Public License |
| 15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. | 15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. |
| 16 */ | 16 */ |
| 17 | 17 |
| 18 package org.adblockplus.android; | 18 package org.adblockplus.android; |
| 19 | 19 |
| 20 import com.actionbarsherlock.app.SherlockPreferenceActivity; |
| 21 |
| 20 import android.content.SharedPreferences; | 22 import android.content.SharedPreferences; |
| 21 import android.content.SharedPreferences.OnSharedPreferenceChangeListener; | 23 import android.content.SharedPreferences.OnSharedPreferenceChangeListener; |
| 22 import android.preference.EditTextPreference; | 24 import android.preference.EditTextPreference; |
| 23 import android.preference.ListPreference; | 25 import android.preference.ListPreference; |
| 24 import android.preference.Preference; | 26 import android.preference.Preference; |
| 25 import android.preference.PreferenceActivity; | |
| 26 import android.preference.PreferenceGroup; | 27 import android.preference.PreferenceGroup; |
| 27 import android.preference.PreferenceScreen; | 28 import android.preference.PreferenceScreen; |
| 28 | 29 |
| 29 /** | 30 /** |
| 30 * PreferencesActivity which automatically sets preference summaries according | 31 * PreferencesActivity which automatically sets preference summaries according |
| 31 * to its current values. | 32 * to its current values. |
| 32 */ | 33 */ |
| 33 public class SummarizedPreferences extends PreferenceActivity implements OnShare
dPreferenceChangeListener | 34 public class SummarizedPreferences extends SherlockPreferenceActivity implements
OnSharedPreferenceChangeListener |
| 34 { | 35 { |
| 35 @Override | 36 @Override |
| 36 public void onResume() | 37 public void onResume() |
| 37 { | 38 { |
| 38 super.onResume(); | 39 super.onResume(); |
| 39 initSummaries(getPreferenceScreen()); | 40 initSummaries(getPreferenceScreen()); |
| 40 getPreferenceScreen().getSharedPreferences().registerOnSharedPreferenceChang
eListener(this); | 41 getPreferenceScreen().getSharedPreferences().registerOnSharedPreferenceChang
eListener(this); |
| 41 } | 42 } |
| 42 | 43 |
| 43 @Override | 44 @Override |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 initSummaries((PreferenceGroup) pref); | 86 initSummaries((PreferenceGroup) pref); |
| 86 } | 87 } |
| 87 else | 88 else |
| 88 { | 89 { |
| 89 setPrefSummary(pref); | 90 setPrefSummary(pref); |
| 90 } | 91 } |
| 91 } | 92 } |
| 92 } | 93 } |
| 93 | 94 |
| 94 } | 95 } |
| OLD | NEW |