diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 6f90054b88..716eb554d2 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1172,7 +1172,7 @@ No active profile set! Unknown COB! BG reading missing or recent app restart? Carb constraint violation! - Calc (IC: %1$.1f, ISF: %2$.1f)" + Calc (IC: %1$.1f, ISF: %2$.1f) Carbs: %1$.2fU COB: %1$.0fg %2$.2fU BG: %1$.2fU diff --git a/wear/src/main/java/info/nightscout/androidaps/complications/ComplicationTapBroadcastReceiver.kt b/wear/src/main/java/info/nightscout/androidaps/complications/ComplicationTapBroadcastReceiver.kt index f8452ec35d..876485cbcd 100644 --- a/wear/src/main/java/info/nightscout/androidaps/complications/ComplicationTapBroadcastReceiver.kt +++ b/wear/src/main/java/info/nightscout/androidaps/complications/ComplicationTapBroadcastReceiver.kt @@ -81,7 +81,7 @@ class ComplicationTapBroadcastReceiver : DaggerBroadcastReceiver() { } private val complicationTapAction: String - get() = sp.getString("complication_tap_action", "default") + get() = sp.getString(R.string.key_complication_tap_action, "default") private fun remapActionWithUserPreferences(originalAction: ComplicationAction): ComplicationAction { val userPrefAction = complicationTapAction diff --git a/wear/src/main/java/info/nightscout/androidaps/interaction/actions/ViewSelectorActivity.kt b/wear/src/main/java/info/nightscout/androidaps/interaction/actions/ViewSelectorActivity.kt index 0552f59f36..9fd6b9adf1 100644 --- a/wear/src/main/java/info/nightscout/androidaps/interaction/actions/ViewSelectorActivity.kt +++ b/wear/src/main/java/info/nightscout/androidaps/interaction/actions/ViewSelectorActivity.kt @@ -74,7 +74,7 @@ open class ViewSelectorActivity : DaggerActivity() { } fun getInflatedPlusMinusView(container: ViewGroup?): View = - when (sp.getInt("input_design", 1)) { + when (sp.getInt(R.string.key_input_design, 1)) { 2 -> LayoutInflater.from(applicationContext).inflate(R.layout.action_editplusminus_item_quickrighty, container, false) 3 -> LayoutInflater.from(applicationContext).inflate(R.layout.action_editplusminus_item_quicklefty, container, false) 4 -> LayoutInflater.from(applicationContext).inflate(R.layout.action_editplusminus_item_viktoria, container, false) diff --git a/wear/src/main/java/info/nightscout/androidaps/watchfaces/BaseWatchFace.kt b/wear/src/main/java/info/nightscout/androidaps/watchfaces/BaseWatchFace.kt index c32cb1397b..a25d320dd4 100644 --- a/wear/src/main/java/info/nightscout/androidaps/watchfaces/BaseWatchFace.kt +++ b/wear/src/main/java/info/nightscout/androidaps/watchfaces/BaseWatchFace.kt @@ -236,7 +236,7 @@ abstract class BaseWatchFace : WatchFace() { open fun changeChartTimeframe() { var timeframe = sp.getInt(R.string.key_chart_time_frame, 3) timeframe = timeframe % 5 + 1 - sp.putInt(R.string.key_chart_time_frame, timeframe) + sp.putString(R.string.key_chart_time_frame, timeframe.toString()) } override fun getWatchFaceStyle(): WatchFaceStyle { diff --git a/wear/src/main/java/info/nightscout/androidaps/watchfaces/SteampunkWatchface.kt b/wear/src/main/java/info/nightscout/androidaps/watchfaces/SteampunkWatchface.kt index fde17ae1e7..eba08790d6 100644 --- a/wear/src/main/java/info/nightscout/androidaps/watchfaces/SteampunkWatchface.kt +++ b/wear/src/main/java/info/nightscout/androidaps/watchfaces/SteampunkWatchface.kt @@ -198,6 +198,6 @@ class SteampunkWatchface : BaseWatchFace() { var timeframe = sp.getInt(R.string.key_chart_time_frame, 3) timeframe = timeframe % 5 + 1 pointSize = if (timeframe < 3) 2 else 1 - sp.putInt(R.string.key_chart_time_frame, timeframe) + sp.putString(R.string.key_chart_time_frame, timeframe.toString()) } } \ No newline at end of file diff --git a/wear/src/main/res/values/strings.xml b/wear/src/main/res/values/strings.xml index 3cf7217ce7..1869913e37 100644 --- a/wear/src/main/res/values/strings.xml +++ b/wear/src/main/res/values/strings.xml @@ -220,5 +220,7 @@ match_divider simplify_ui dark + input_design + complication_tap_action diff --git a/wear/src/main/res/xml/preferences.xml b/wear/src/main/res/xml/preferences.xml index e383787582..5719c3ea66 100644 --- a/wear/src/main/res/xml/preferences.xml +++ b/wear/src/main/res/xml/preferences.xml @@ -105,7 +105,7 @@ android:defaultValue="1" android:entries="@array/input_design" android:entryValues="@array/input_design_values" - android:key="input_design" + android:key="@string/key_input_design" android:summary="Input Design" android:title="@string/pref_input_design" /> @@ -152,7 +152,7 @@ android:defaultValue="default" android:entries="@array/complication_tap_action" android:entryValues="@array/complication_tap_action_values" - android:key="complication_tap_action" + android:key="@string/key_complication_tap_action" android:summary="What dialog to show after tap on complication" android:title="@string/pref_complication_tap_action" />