diff --git a/app/src/main/java/com/philliphsu/clock2/settings/SettingsActivity.java b/app/src/main/java/com/philliphsu/clock2/settings/SettingsActivity.java
index 5ffbc33..2bd31ac 100644
--- a/app/src/main/java/com/philliphsu/clock2/settings/SettingsActivity.java
+++ b/app/src/main/java/com/philliphsu/clock2/settings/SettingsActivity.java
@@ -9,18 +9,6 @@ import com.philliphsu.clock2.R;
* Created by Phillip Hsu on 6/6/2016.
*/
public class SettingsActivity extends BaseActivity {
- /*
- * TODO: Define these keys as string resources instead and then delete these.
- * TODO: Move the existing string resources for the preferences below from strings.xml to prefs.xml
- */
- // World Clock preference keys
- public static final String KEY_PREF_SHOW_TIME_OFFSETS_FROM = "pref_show_time_offsets_from";
- // Alarms preference keys
- public static final String KEY_PREF_TIME_PICKER_STYLE = "pref_time_picker_style";
- public static final String KEY_PREF_SNOOZE_DURATION = "pref_snooze_duration";
- public static final String KEY_PREF_FIRST_DAY_OF_WEEK = "pref_first_day_of_week";
- // Timers preference keys
- public static final String KEY_PREF_TIMER_RINGTONE = "pref_timer_ringtone";
@Override
protected void onCreate(Bundle savedInstanceState) {
diff --git a/app/src/main/java/com/philliphsu/clock2/settings/SettingsFragment.java b/app/src/main/java/com/philliphsu/clock2/settings/SettingsFragment.java
index 4b51af9..1e6eb1a 100644
--- a/app/src/main/java/com/philliphsu/clock2/settings/SettingsFragment.java
+++ b/app/src/main/java/com/philliphsu/clock2/settings/SettingsFragment.java
@@ -23,8 +23,7 @@ public class SettingsFragment extends PreferenceFragment implements SharedPrefer
super.onCreate(savedInstanceState);
addPreferencesFromResource(R.xml.preferences);
// Set ringtone summary
- setSummary(getPreferenceScreen().getSharedPreferences(),
- SettingsActivity.KEY_PREF_TIMER_RINGTONE);
+ setSummary(getPreferenceScreen().getSharedPreferences(), getString(R.string.key_timer_ringtone));
findPreference(getString(R.string.key_alarm_volume))
.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
@Override
diff --git a/app/src/main/res/values/prefs.xml b/app/src/main/res/values/prefs_alarms.xml
similarity index 60%
rename from app/src/main/res/values/prefs.xml
rename to app/src/main/res/values/prefs_alarms.xml
index a7e31de..b91e93f 100644
--- a/app/src/main/res/values/prefs.xml
+++ b/app/src/main/res/values/prefs_alarms.xml
@@ -1,9 +1,23 @@
+ Alarms
+
+
+ key_time_picker_style
+ Time picker style
+ Number pad
+ Radial clock
+
+ - @string/number_pad
+ - @string/radial_clock
+
+
key_silence_after
Silence after
-
+
+ key_snooze_duration
+ Snooze duration
- 1 minute
@@ -51,4 +65,16 @@
- 7
- 8
+
+
+ key_first_day_of_week
+ First day of week
+ Saturday
+ Sunday
+ Monday
+
+ - @string/saturday
+ - @string/sunday
+ - @string/monday
+
\ No newline at end of file
diff --git a/app/src/main/res/values/prefs_timers.xml b/app/src/main/res/values/prefs_timers.xml
new file mode 100644
index 0000000..0d0555b
--- /dev/null
+++ b/app/src/main/res/values/prefs_timers.xml
@@ -0,0 +1,7 @@
+
+
+ Timers
+
+ key_timer_ringtone
+ Ringtone
+
\ No newline at end of file
diff --git a/app/src/main/res/values/prefs_world_clock.xml b/app/src/main/res/values/prefs_world_clock.xml
new file mode 100644
index 0000000..0012983
--- /dev/null
+++ b/app/src/main/res/values/prefs_world_clock.xml
@@ -0,0 +1,13 @@
+
+
+ World Clock
+
+ key_show_time_offsets_from
+ Show time offsets from
+ Local time
+ GMT
+
+ - @string/local_time
+ - @string/gmt
+
+
\ No newline at end of file
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 83a5340..075615b 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -49,40 +49,7 @@
Undo
-
Settings
-
- World Clock
- Show time offsets from
- Local time
- GMT
-
- - @string/pref_show_time_offsets_from_local
- - @string/pref_show_time_offsets_from_gmt
-
-
- Alarms
- Time picker style
- Number pad
- Radial clock
-
- - @string/pref_time_picker_style_number_pad
- - @string/pref_time_picker_style_radial_clock
-
- Snooze duration
- First day of week
- Saturday
- Sunday
- Monday
-
- - @string/pref_first_day_of_week_saturday
- - @string/pref_first_day_of_week_sunday
- - @string/pref_first_day_of_week_monday
-
-
- Timers
- Ringtone
-
Sun
Mon
diff --git a/app/src/main/res/xml/preferences.xml b/app/src/main/res/xml/preferences.xml
index 34b8457..d0e96c0 100644
--- a/app/src/main/res/xml/preferences.xml
+++ b/app/src/main/res/xml/preferences.xml
@@ -1,24 +1,24 @@
-
+
-
+
-
+