Update Settings if the units (metric/imperial) are changed.

This commit is contained in:
Dennis Guse
2019-10-15 17:29:44 +02:00
parent a83eb0b983
commit 8c9bf60fc6
5 changed files with 48 additions and 154 deletions
-79
View File
@@ -1,79 +0,0 @@
<?xml version="1.0" encoding="utf-8"?><!--
Copyright 2012 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
android:title="@string/settings_recording">
<ListPreference
android:defaultValue="0"
android:entryValues="@array/frequency_values"
android:key="@string/voice_frequency_key"
android:summary="%s"
android:title="@string/menu_voice_frequency" />
<ListPreference
android:defaultValue="0"
android:entryValues="@array/frequency_values"
android:key="@string/split_frequency_key"
android:summary="%s"
android:title="@string/menu_split_frequency" />
<ListPreference
android:defaultValue="@string/settings_recording_track_name_date_iso_8601_value"
android:entries="@array/track_name_options"
android:entryValues="@array/track_name_values"
android:key="@string/track_name_key"
android:summary="%s"
android:title="@string/settings_recording_track_name_title" />
<ListPreference
android:defaultValue="0"
android:entryValues="@array/min_recording_interval_values"
android:key="@string/min_recording_interval_key"
android:summary="%s"
android:title="@string/settings_recording_min_recording_interval_title" />
<ListPreference
android:defaultValue="10"
android:entryValues="@array/recording_distance_interval_values"
android:key="@string/recording_distance_interval_key"
android:summary="%s"
android:title="@string/settings_recording_min_recording_distance_title" />
<ListPreference
android:defaultValue="200"
android:entryValues="@array/max_recording_distance_values"
android:key="@string/max_recording_distance_key"
android:summary="%s"
android:title="@string/settings_recording_max_recording_distance_title" />
<ListPreference
android:defaultValue="50"
android:entryValues="@array/recording_gps_accuracy_values"
android:key="@string/recording_gps_accuracy_key"
android:summary="%s"
android:title="@string/settings_recording_min_required_accuracy_title" />
<ListPreference
android:defaultValue="10"
android:entryValues="@array/auto_resume_track_timeout_values"
android:entries="@array/auto_resume_track_timeout_values"
android:key="@string/auto_resume_track_timeout_key"
android:summary="%s"
android:title="@string/settings_recording_auto_resume_track_timeout_title" />
<CheckBoxPreference
android:defaultValue="false"
android:key="@string/trackdetail_show_on_lockscreen_while_recording_key"
android:summary="@string/settings_recording_show_on_lockscreen_while_recording_summary"
android:title="@string/settings_recording_show_on_lockscreen_while_recording_title" />
<!-- <de.dennisguse.opentracks.settings.ActivityTypePreference-->
<!-- android:defaultValue="@string/activity_type_running"-->
<!-- android:key="@string/default_activity_key"-->
<!-- android:summary="%s"-->
<!-- android:title="@string/settings_recording_default_activity_title" />-->
</PreferenceScreen>
-42
View File
@@ -1,42 +0,0 @@
<?xml version="1.0" encoding="utf-8"?><!--
Copyright 2012 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
android:title="@string/track_detail_stats_tab">
<ListPreference
android:defaultValue="@string/stats_units_metric"
android:entries="@array/stats_units_options"
android:entryValues="@array/stats_units_values"
android:key="@string/stats_units_key"
android:summary="%s"
android:title="@string/settings_stats_units_title" />
<ListPreference
android:defaultValue="@string/stats_rate_speed"
android:entries="@array/stats_rate_metric_options"
android:entryValues="@array/stats_rate_values"
android:key="@string/stats_rate_key"
android:summary="%s"
android:title="@string/settings_stats_rate_title" />
<PreferenceCategory android:title="@string/settings_show">
<CheckBoxPreference
android:defaultValue="false"
android:key="@string/stats_show_grade_elevation_key"
android:title="@string/settings_stats_grade_elevation" />
<CheckBoxPreference
android:defaultValue="false"
android:key="@string/stats_show_coordinate_key"
android:title="@string/settings_stats_coordinate" />
</PreferenceCategory>
</PreferenceScreen>