Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: src/org/adblockplus/android/SummarizedPreferences.java

Issue 8493083: ABP/Android UI (Closed)
Left Patch Set: Created Oct. 5, 2012, 9:42 a.m.
Right Patch Set: ABP/Android UI Created Oct. 12, 2012, 1:24 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « src/org/adblockplus/android/RefreshableListPreference.java ('k') | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 package org.adblockplus.android; 1 package org.adblockplus.android;
2 2
3 import android.content.SharedPreferences; 3 import android.content.SharedPreferences;
4 import android.content.SharedPreferences.OnSharedPreferenceChangeListener; 4 import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
5 import android.preference.EditTextPreference; 5 import android.preference.EditTextPreference;
6 import android.preference.ListPreference; 6 import android.preference.ListPreference;
7 import android.preference.Preference; 7 import android.preference.Preference;
8 import android.preference.PreferenceActivity; 8 import android.preference.PreferenceActivity;
9 import android.preference.PreferenceGroup; 9 import android.preference.PreferenceGroup;
10 import android.preference.PreferenceScreen; 10 import android.preference.PreferenceScreen;
11 11
12 /** 12 /**
13 * PreferencesActivity which automatically sets preference summaries according 13 * PreferencesActivity which automatically sets preference summaries according
14 * to its current values. 14 * to its current values.
15 */ 15 */
16 public class SummarizedPreferences extends PreferenceActivity implements OnShare dPreferenceChangeListener 16 public class SummarizedPreferences extends PreferenceActivity implements OnShare dPreferenceChangeListener
17 { 17 {
18 @Override 18 @Override
19 public void onResume() 19 public void onResume()
20 { 20 {
21 super.onResume(); 21 super.onResume();
22 // initialize list summaries
Felix Dahlke 2012/10/09 14:27:29 Why not call initSummaries() initListSummaries() t
Andrey Novikov 2012/10/12 13:19:14 The comment was wrong, I've coped it from my old c
23 initSummaries(getPreferenceScreen()); 22 initSummaries(getPreferenceScreen());
24 getPreferenceScreen().getSharedPreferences().registerOnSharedPreferenceChang eListener(this); 23 getPreferenceScreen().getSharedPreferences().registerOnSharedPreferenceChang eListener(this);
25 } 24 }
26 25
27 @Override 26 @Override
28 public void onPause() 27 public void onPause()
29 { 28 {
30 super.onPause(); 29 super.onPause();
31 getPreferenceScreen().getSharedPreferences().unregisterOnSharedPreferenceCha ngeListener(this); 30 getPreferenceScreen().getSharedPreferences().unregisterOnSharedPreferenceCha ngeListener(this);
32 } 31 }
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 initSummaries((PreferenceGroup) pref); 68 initSummaries((PreferenceGroup) pref);
70 } 69 }
71 else 70 else
72 { 71 {
73 setPrefSummary(pref); 72 setPrefSummary(pref);
74 } 73 }
75 } 74 }
76 } 75 }
77 76
78 } 77 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld