From 58b3ae2543c90b0979f84444c7b9b685bde88f97 Mon Sep 17 00:00:00 2001 From: Gustavo Martin Morcuende Date: Mon, 13 Oct 2014 02:32:58 +0200 Subject: [PATCH] WeatherInformation: pressure units configuration --- Android/WeatherInformation/AndroidManifest.xml | 5 +- Android/WeatherInformation/res/values/arrays.xml | 86 ++++++---------------- Android/WeatherInformation/res/values/strings.xml | 22 +++++- .../res/xml/appwidget_preferences.xml | 2 +- .../res/xml/weather_preferences.xml | 20 +++-- .../exampletdd/NotificationIntentService.java | 2 +- .../de/example/exampletdd/WidgetIntentService.java | 2 +- .../fragment/current/CurrentFragment.java | 55 +++++++++----- .../fragment/overview/OverviewFragment.java | 2 +- .../WeatherInformationPreferencesFragment.java | 38 +++++++++- .../fragment/specific/SpecificFragment.java | 57 +++++++++----- .../example/exampletdd/widget/WidgetConfigure.java | 1 - .../exampletdd/widget/WidgetPreferences.java | 4 +- 13 files changed, 177 insertions(+), 119 deletions(-) diff --git a/Android/WeatherInformation/AndroidManifest.xml b/Android/WeatherInformation/AndroidManifest.xml index a626e9b..55771d1 100644 --- a/Android/WeatherInformation/AndroidManifest.xml +++ b/Android/WeatherInformation/AndroidManifest.xml @@ -56,9 +56,12 @@ android:parentActivityName="de.example.exampletdd.WeatherTabsActivity" > - + + + + diff --git a/Android/WeatherInformation/res/values/arrays.xml b/Android/WeatherInformation/res/values/arrays.xml index d306f8e..af804e7 100644 --- a/Android/WeatherInformation/res/values/arrays.xml +++ b/Android/WeatherInformation/res/values/arrays.xml @@ -1,65 +1,5 @@ - - ºC - ºF - K - - - celsius - fahrenheit - kelvin - - - ar - bg - zh_cn - zh_tw - cz - nl - en - fi - fr - gl - de - it - mk - pl - pt - ro - ru - sk - sp - se - tr - ua - vi - - - Arabic - Bulgarian - Chinese Simplified - Chinese Traditional - Czech - Dutch - English - Finnish - French - Galician - German - Italian - Macedonian - Polish - Portuguese - Romanian - Russian - Slovak - Spanish - Swedish - Turkish - Ukrainian - Vietnamese - 5 10 @@ -102,12 +42,30 @@ half day one day + + @string/weather_preferences_temperature_celsius + @string/weather_preferences_temperature_fahrenheit + @string/weather_preferences_temperature_kelvin + + + @string/weather_preferences_temperature_celsius_human_value + @string/weather_preferences_temperature_fahrenheit_human_value + @string/weather_preferences_temperature_kelvin_human_value + - m/s - mph + @string/weather_preferences_wind_meters + @string/weather_preferences_wind_miles - meter per second - miles per hour + @string/weather_preferences_wind_human_value_meters + @string/weather_preferences_wind_human_value_miles + + + @string/weather_preferences_pressure_pascal + @string/weather_preferences_pressure_standard_atm + + + @string/weather_preferences_pressure_human_value_pascal + @string/weather_preferences_pressure_human_value_standard_atm diff --git a/Android/WeatherInformation/res/values/strings.xml b/Android/WeatherInformation/res/values/strings.xml index 76158fa..53195da 100644 --- a/Android/WeatherInformation/res/values/strings.xml +++ b/Android/WeatherInformation/res/values/strings.xml @@ -20,8 +20,14 @@ Icon weather Settings Units - weather_preferences_units - Temperature + weather_preferences_temperature + Temperature + ºC + ºF + K + celsius + fahrenheit + kelvin Notifications Disabled Enabled @@ -36,7 +42,16 @@ Refresh interval weather_preferences_wind Wind - meter per second + m/s + mph + meter per second + miles per hour + weather_preferences_pressure + Pressure + hpa + atm + pascal + standard atmosphere Units widget_preferences_units widget_preferences_refresh_interval @@ -51,6 +66,5 @@ Get Location mm 3h % - hpa No data available diff --git a/Android/WeatherInformation/res/xml/appwidget_preferences.xml b/Android/WeatherInformation/res/xml/appwidget_preferences.xml index 1445bae..4ab359e 100644 --- a/Android/WeatherInformation/res/xml/appwidget_preferences.xml +++ b/Android/WeatherInformation/res/xml/appwidget_preferences.xml @@ -10,7 +10,7 @@ android:summary="five minutes" /> - + android:defaultValue="@string/weather_preferences_temperature_celsius" /> +