diff --git a/app/src/main/java/es/eoinrul/ecwt/DitDahGenerator.kt b/app/src/main/java/es/eoinrul/ecwt/DitDahGenerator.kt
index 959f7a5..95f297e 100644
--- a/app/src/main/java/es/eoinrul/ecwt/DitDahGenerator.kt
+++ b/app/src/main/java/es/eoinrul/ecwt/DitDahGenerator.kt
@@ -360,9 +360,11 @@ data class DitDahGeneratorSettings(var context : Context? = null) {
init {
if(context != null) {
val sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context)
- toneFrequency = sharedPreferences.getInt(context!!.getString(R.string.setting_tone_key), toneFrequency)
wordsPerMinute = sharedPreferences.getInt(context!!.getString(R.string.setting_wpm_key), wordsPerMinute)
farnsworthWordsPerMinute = sharedPreferences.getInt(context!!.getString(R.string.setting_effective_wpm_key), farnsworthWordsPerMinute)
+
+ // This one is a little strange; the ListPreference stores a string, which we need to parse
+ toneFrequency = sharedPreferences.getString(context!!.getString(R.string.setting_tone_key), toneFrequency.toString())!!.toInt()
}
}
}
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 371ea90..f7ba2f7 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -18,7 +18,6 @@
Effective Words per Minute
Allows extra spacing between characters
-
sender_tone
sender_wpm
sender_effective_wpm
@@ -34,4 +33,24 @@
Variable group length
Always groups of 5
Groups between 2 and 6 characters
+
+
+ - 400Hz
+ - 450Hz
+ - 500Hz
+ - 550Hz
+ - 600Hz
+ - 650Hz
+ - 700Hz
+
+
+
+ - 400
+ - 450
+ - 500
+ - 550
+ - 600
+ - 650
+ - 700
+
diff --git a/app/src/main/res/xml/root_preferences.xml b/app/src/main/res/xml/root_preferences.xml
index 8cb2c1b..b28ac66 100644
--- a/app/src/main/res/xml/root_preferences.xml
+++ b/app/src/main/res/xml/root_preferences.xml
@@ -10,15 +10,12 @@
android:summaryOn="YEAH"
android:title="Switch preference" />
-
+ android:entries="@array/tone_frequency_strings"
+ android:entryValues="@array/tone_frequency_values"
+ android:key="@string/setting_tone_key"
+ android:title="@string/setting_tone_frequency_label" />