aboutsummaryrefslogtreecommitdiffstats
path: root/src/com/cyanogenmod/lockclock/preference
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/cyanogenmod/lockclock/preference')
-rw-r--r--src/com/cyanogenmod/lockclock/preference/CalendarPreferences.java4
-rw-r--r--src/com/cyanogenmod/lockclock/preference/ClockPreferences.java6
-rw-r--r--src/com/cyanogenmod/lockclock/preference/WeatherPreferences.java14
3 files changed, 12 insertions, 12 deletions
diff --git a/src/com/cyanogenmod/lockclock/preference/CalendarPreferences.java b/src/com/cyanogenmod/lockclock/preference/CalendarPreferences.java
index a192efd..e125929 100644
--- a/src/com/cyanogenmod/lockclock/preference/CalendarPreferences.java
+++ b/src/com/cyanogenmod/lockclock/preference/CalendarPreferences.java
@@ -112,8 +112,8 @@ public class CalendarPreferences extends PreferenceFragment implements
private static final int DISPLAY_NAME_INDEX = 1;
static CalendarEntries findCalendars(Context context) {
- List<CharSequence> entries = new ArrayList<CharSequence>();
- List<CharSequence> entryValues = new ArrayList<CharSequence>();
+ List<CharSequence> entries = new ArrayList<>();
+ List<CharSequence> entryValues = new ArrayList<>();
ContentResolver cr = context.getContentResolver();
Cursor calendarCursor = cr.query(uri, projection, null, null, null);
diff --git a/src/com/cyanogenmod/lockclock/preference/ClockPreferences.java b/src/com/cyanogenmod/lockclock/preference/ClockPreferences.java
index 7a85a8c..88a6acc 100644
--- a/src/com/cyanogenmod/lockclock/preference/ClockPreferences.java
+++ b/src/com/cyanogenmod/lockclock/preference/ClockPreferences.java
@@ -21,10 +21,10 @@ import android.content.Intent;
import android.content.SharedPreferences;
import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
import android.os.Bundle;
-import android.preference.CheckBoxPreference;
import android.preference.ListPreference;
import android.preference.Preference;
import android.preference.PreferenceFragment;
+import android.preference.SwitchPreference;
import android.text.format.DateFormat;
import com.cyanogenmod.lockclock.ClockWidgetProvider;
@@ -37,7 +37,7 @@ public class ClockPreferences extends PreferenceFragment implements
private Context mContext;
private ListPreference mClockFontColor;
private ListPreference mAlarmFontColor;
- private CheckBoxPreference mAmPmToggle;
+ private SwitchPreference mAmPmToggle;
@Override
public void onCreate(Bundle savedInstanceState) {
@@ -48,7 +48,7 @@ public class ClockPreferences extends PreferenceFragment implements
mContext = getActivity();
mClockFontColor = (ListPreference) findPreference(Constants.CLOCK_FONT_COLOR);
mAlarmFontColor = (ListPreference) findPreference(Constants.CLOCK_ALARM_FONT_COLOR);
- mAmPmToggle = (CheckBoxPreference) findPreference(Constants.CLOCK_AM_PM_INDICATOR);
+ mAmPmToggle = (SwitchPreference) findPreference(Constants.CLOCK_AM_PM_INDICATOR);
updateFontColorsSummary();
updateAmPmToggle();
diff --git a/src/com/cyanogenmod/lockclock/preference/WeatherPreferences.java b/src/com/cyanogenmod/lockclock/preference/WeatherPreferences.java
index 94537c0..97dcef6 100644
--- a/src/com/cyanogenmod/lockclock/preference/WeatherPreferences.java
+++ b/src/com/cyanogenmod/lockclock/preference/WeatherPreferences.java
@@ -25,11 +25,11 @@ import android.content.Intent;
import android.content.SharedPreferences;
import android.location.LocationManager;
import android.os.Bundle;
-import android.preference.CheckBoxPreference;
import android.preference.EditTextPreference;
import android.preference.ListPreference;
import android.preference.Preference;
import android.preference.PreferenceFragment;
+import android.preference.SwitchPreference;
import android.provider.Settings;
import android.text.TextUtils;
import android.util.Log;
@@ -53,13 +53,13 @@ public class WeatherPreferences extends PreferenceFragment implements
Constants.WEATHER_REFRESH_INTERVAL
};
- private CheckBoxPreference mUseCustomLoc;
+ private SwitchPreference mUseCustomLoc;
private EditTextPreference mCustomWeatherLoc;
private ListPreference mFontColor;
private ListPreference mTimestampFontColor;
- private CheckBoxPreference mUseMetric;
+ private SwitchPreference mUseMetric;
private IconSelectionPreference mIconSet;
- private CheckBoxPreference mUseCustomlocation;
+ private SwitchPreference mUseCustomlocation;
private Context mContext;
private ContentResolver mResolver;
@@ -73,13 +73,13 @@ public class WeatherPreferences extends PreferenceFragment implements
mResolver = mContext.getContentResolver();
// Load items that need custom summaries etc.
- mUseCustomLoc = (CheckBoxPreference) findPreference(Constants.WEATHER_USE_CUSTOM_LOCATION);
+ mUseCustomLoc = (SwitchPreference) findPreference(Constants.WEATHER_USE_CUSTOM_LOCATION);
mCustomWeatherLoc = (EditTextPreference) findPreference(Constants.WEATHER_CUSTOM_LOCATION_CITY);
mFontColor = (ListPreference) findPreference(Constants.WEATHER_FONT_COLOR);
mTimestampFontColor = (ListPreference) findPreference(Constants.WEATHER_TIMESTAMP_FONT_COLOR);
mIconSet = (IconSelectionPreference) findPreference(Constants.WEATHER_ICONS);
- mUseMetric = (CheckBoxPreference) findPreference(Constants.WEATHER_USE_METRIC);
- mUseCustomlocation = (CheckBoxPreference) findPreference(Constants.WEATHER_USE_CUSTOM_LOCATION);
+ mUseMetric = (SwitchPreference) findPreference(Constants.WEATHER_USE_METRIC);
+ mUseCustomlocation = (SwitchPreference) findPreference(Constants.WEATHER_USE_CUSTOM_LOCATION);
// At first placement/start default the use of Metric units based on locale
// If we had a previously set value already, this will just reset the same value