Last pref summary: notifications
This commit is contained in:
parent
de40bed7e1
commit
962521947e
@ -22,7 +22,8 @@
|
||||
<string name="automatic_scan_wifi_on">Update app lists automatically only on wifi</string>
|
||||
<string name="automatic_scan_wifi_off">Always update app lists automatically</string>
|
||||
<string name="notify">Notify</string>
|
||||
<string name="notify_updates_available">Notify when new updates are available</string>
|
||||
<string name="notify_on">Notify when updates are available</string>
|
||||
<string name="notify_off">Do not notify of any updates</string>
|
||||
<string name="update_history">Update history</string>
|
||||
<string name="update_history_summ">Days to consider apps new or recent: %s</string>
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
android:defaultValue="false"
|
||||
android:key="updateOnWifiOnly" />
|
||||
<CheckBoxPreference android:title="@string/notify"
|
||||
android:defaultValue="true" android:summary="@string/notify_updates_available"
|
||||
android:defaultValue="true"
|
||||
android:key="updateNotify" />
|
||||
<EditTextPreference
|
||||
android:defaultValue="14"
|
||||
|
@ -28,6 +28,7 @@ public class Preferences implements SharedPreferences.OnSharedPreferenceChangeLi
|
||||
|
||||
public static final String PREF_UPD_INTERVAL = "updateInterval";
|
||||
public static final String PREF_UPD_WIFI_ONLY = "updateOnWifiOnly";
|
||||
public static final String PREF_UPD_NOTIFY = "updateNotify";
|
||||
public static final String PREF_UPD_HISTORY = "updateHistoryDays";
|
||||
public static final String PREF_ROOTED = "rooted";
|
||||
public static final String PREF_INCOMP_VER = "incompatibleVersions";
|
||||
|
@ -44,6 +44,7 @@ public class PreferencesActivity extends PreferenceActivity implements
|
||||
private static String[] summariesToUpdate = {
|
||||
Preferences.PREF_UPD_INTERVAL,
|
||||
Preferences.PREF_UPD_WIFI_ONLY,
|
||||
Preferences.PREF_UPD_NOTIFY,
|
||||
Preferences.PREF_UPD_HISTORY,
|
||||
Preferences.PREF_ROOTED,
|
||||
Preferences.PREF_INCOMP_VER,
|
||||
@ -92,6 +93,17 @@ public class PreferencesActivity extends PreferenceActivity implements
|
||||
return;
|
||||
}
|
||||
|
||||
if (key.equals(Preferences.PREF_UPD_NOTIFY)) {
|
||||
CheckBoxPreference pref = (CheckBoxPreference)findPreference(
|
||||
Preferences.PREF_UPD_NOTIFY);
|
||||
if (pref.isChecked()) {
|
||||
pref.setSummary(R.string.notify_on);
|
||||
} else {
|
||||
pref.setSummary(R.string.notify_off);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (key.equals(Preferences.PREF_UPD_HISTORY)) {
|
||||
EditTextPreference pref = (EditTextPreference)findPreference(
|
||||
Preferences.PREF_UPD_HISTORY);
|
||||
|
Loading…
x
Reference in New Issue
Block a user