diff options
author | DvTonder <david.vantonder@gmail.com> | 2015-02-09 19:47:08 -0500 |
---|---|---|
committer | DvTonder <david.vantonder@gmail.com> | 2015-02-09 22:08:14 -0500 |
commit | bc4e4bdb4bf017f6730032f415565fcaf45f5e2d (patch) | |
tree | 8d2aef024ba0cc788f84fbdc163e82e62487e5a5 /src/com/cyanogenmod/lockclock/preference | |
parent | a519899c4b6103dc69bfba72f964f9d2a1a4c39f (diff) | |
download | android_packages_apps_LockClock-bc4e4bdb4bf017f6730032f415565fcaf45f5e2d.tar.gz android_packages_apps_LockClock-bc4e4bdb4bf017f6730032f415565fcaf45f5e2d.tar.bz2 android_packages_apps_LockClock-bc4e4bdb4bf017f6730032f415565fcaf45f5e2d.zip |
LockClock: Materialize the UI and update for Lollipop
Change-Id: I8128e7aa94bca26b012d63c1bb95bd09d31db7e0
Diffstat (limited to 'src/com/cyanogenmod/lockclock/preference')
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 |