Add stats settings to configure the stats page.

This commit is contained in:
Jimmy Shih
2012-04-30 11:22:13 -07:00
parent 20eec8d30a
commit 39a3fb6132
15 changed files with 380 additions and 186 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

+2 -3
View File
@@ -34,8 +34,7 @@ limitations under the License.
style="@style/StatsValue" />
</TableRow>
<include layout="@layout/stats_core" />
<!-- Latitude and longitude -->
<TableRow>
<TableRow android:id="@+id/stats_coordinate_label_table_row" >
<TextView
android:text="@string/stats_latitude"
style="@style/StatsLabel" />
@@ -44,7 +43,7 @@ limitations under the License.
android:text="@string/stats_longitude"
style="@style/StatsLabel" />
</TableRow>
<TableRow>
<TableRow android:id="@+id/stats_coordinate_value_table_row" >
<TextView
android:id="@+id/stats_latitude_value"
style="@style/StatsValue" />
+30 -46
View File
@@ -15,11 +15,33 @@ See the License for the specific language governing permissions and
limitations under the License.
-->
<merge xmlns:android="http://schemas.android.com/apk/res/android" >
<!-- Total distance and max speed (fastest pace) -->
<!-- Total distance -->
<TableRow>
<TextView
android:text="@string/stats_total_distance"
style="@style/StatsLabel" />
</TableRow>
<TableRow>
<TextView
android:id="@+id/stats_total_distance_value"
style="@style/StatsValue" />
</TableRow>
<!-- Total time/moving time -->
<TableRow>
<TextView
android:id="@+id/stats_total_time_label"
style="@style/StatsLabel" />
</TableRow>
<TableRow>
<TextView
android:id="@+id/stats_total_time_value"
style="@style/StatsValue" />
</TableRow>
<!-- Average speed/average moving speed and max speed (average pace/average moving pace and fastest pace) -->
<TableRow>
<TextView
android:id="@+id/stats_average_speed_label"
style="@style/StatsLabel" />
<TextView
android:id="@+id/stats_max_speed_label"
android:layout_column="2"
@@ -27,53 +49,15 @@ limitations under the License.
</TableRow>
<TableRow>
<TextView
android:id="@+id/stats_total_distance_value"
android:id="@+id/stats_average_speed_value"
style="@style/StatsValue" />
<TextView style="@style/StatsSpacer" />
<TextView
android:id="@+id/stats_max_speed_value"
style="@style/StatsValue" />
</TableRow>
<!-- Total time and average speed (average pace) -->
<TableRow>
<TextView
android:text="@string/stats_total_time"
style="@style/StatsLabel" />
<TextView
android:id="@+id/stats_average_speed_label"
android:layout_column="2"
style="@style/StatsLabel" />
</TableRow>
<TableRow>
<TextView
android:id="@+id/stats_total_time_value"
style="@style/StatsValue" />
<TextView style="@style/StatsSpacer" />
<TextView
android:id="@+id/stats_average_speed_value"
style="@style/StatsValue" />
</TableRow>
<!-- Moving time and average moving speed (average moving pace) -->
<TableRow>
<TextView
android:text="@string/stats_moving_time"
style="@style/StatsLabel" />
<TextView
android:id="@+id/stats_average_moving_speed_label"
android:layout_column="2"
style="@style/StatsLabel" />
</TableRow>
<TableRow>
<TextView
android:id="@+id/stats_moving_time_value"
style="@style/StatsValue" />
<TextView style="@style/StatsSpacer" />
<TextView
android:id="@+id/stats_average_moving_speed_value"
style="@style/StatsValue" />
</TableRow>
<!-- Elevation and elevation gain -->
<TableRow>
<TableRow android:id="@+id/stats_elevation_label_table_row1" >
<TextView
android:text="@string/stats_elevation"
style="@style/StatsLabel" />
@@ -82,7 +66,7 @@ limitations under the License.
android:text="@string/stats_elevation_gain"
style="@style/StatsLabel" />
</TableRow>
<TableRow>
<TableRow android:id="@+id/stats_elevation_value_table_row1" >
<TextView
android:id="@+id/stats_elevation_value"
style="@style/StatsValue" />
@@ -92,7 +76,7 @@ limitations under the License.
style="@style/StatsValue" />
</TableRow>
<!-- Min and max elevation -->
<TableRow>
<TableRow android:id="@+id/stats_elevation_label_table_row2" >
<TextView
android:text="@string/stats_min_elevation"
style="@style/StatsLabel" />
@@ -101,7 +85,7 @@ limitations under the License.
android:text="@string/stats_max_elevation"
style="@style/StatsLabel" />
</TableRow>
<TableRow>
<TableRow android:id="@+id/stats_elevation_value_table_row2" >
<TextView
android:id="@+id/stats_min_elevation_value"
style="@style/StatsValue" />
@@ -111,7 +95,7 @@ limitations under the License.
style="@style/StatsValue" />
</TableRow>
<!-- Min and max grade -->
<TableRow>
<TableRow android:id="@+id/stats_grade_label_table_row" >
<TextView
android:text="@string/stats_min_grade"
style="@style/StatsLabel" />
@@ -120,7 +104,7 @@ limitations under the License.
android:text="@string/stats_max_grade"
style="@style/StatsLabel" />
</TableRow>
<TableRow>
<TableRow android:id="@+id/stats_grade_value_table_row" >
<TextView
android:id="@+id/stats_min_grade_value"
style="@style/StatsValue" />
+56
View File
@@ -0,0 +1,56 @@
<?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.
-->
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
style="@style/ScrollView" >
<LinearLayout
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:orientation="vertical"
android:padding="8dp" >
<TextView
android:text="@string/stats_settings_time"
style="@style/TextLarge" />
<RadioGroup
android:id="@+id/stats_settings_time"
android:layout_height="wrap_content"
android:layout_width="wrap_content" >
<RadioButton
android:id="@+id/stats_settings_total_time"
android:text="@string/stats_total_time"
style="@style/TextMedium" />
<RadioButton
android:id="@+id/stats_settings_moving_time"
android:text="@string/stats_moving_time"
style="@style/TextMedium" />
</RadioGroup>
<TextView
android:text="@string/stats_settings_show"
style="@style/TextLarge" />
<CheckBox
android:id="@+id/stats_settings_elevation"
android:text="@string/stats_elevation"
style="@style/TextMedium" />
<CheckBox
android:id="@+id/stats_settings_grade"
android:text="@string/stats_settings_grade"
style="@style/TextMedium" />
<CheckBox
android:id="@+id/stats_settings_coordinate"
android:text="@string/stats_settings_coordinate"
style="@style/TextMedium" />
</LinearLayout>
</ScrollView>
+4
View File
@@ -92,6 +92,10 @@ limitations under the License.
android:icon="@drawable/menu_chart_settings"
android:id="@+id/track_detail_chart_settings"
android:title="@string/menu_chart_settings"/>
<item
android:icon="@drawable/menu_stats_settings"
android:id="@+id/track_detail_stats_settings"
android:title="@string/menu_stats_settings"/>
<item
android:icon="@drawable/menu_settings"
android:id="@+id/track_detail_settings"
+4
View File
@@ -48,6 +48,10 @@ limitations under the License.
<string name="show_check_units_dialog_key">showCheckUnitsDialog</string>
<string name="show_welcome_dialog_key">showWelcomeDialog</string>
<string name="split_frequency_key">splitFrequency</string>
<string name="stats_show_coordinate_key">statsShowCoordinate</string>
<string name="stats_show_elevation_key">statsShowElevation</string>
<string name="stats_show_grade_key">statsShowGrade</string>
<string name="stats_show_total_time_key">statsShowTotalTime</string>
<string name="track_color_mode_dynamic_speed_variation_key">trackColorModeDynamicVariation</string>
<string name="track_color_mode_fixed_speed_medium_display_key">trackColorModeFixedMediumDisplay</string>
<string name="track_color_mode_fixed_speed_medium_key">trackColorModeFixedMedium</string>
+26
View File
@@ -1144,6 +1144,10 @@ limitations under the License.
<string name="menu_show_on_map"
translation_description="In the menu, to show a marker on map.">
Show on map
</string>
<string name="menu_stats_settings"
translation_description="In the menu, to change the stats settings.">
Stats settings
</string>
<string name="menu_stop_recording"
translation_description="In the menu, to stop recording a track.">
@@ -2140,6 +2144,28 @@ limitations under the License.
Total time
</string>
<!-- Stats Settings -->
<string name="stats_settings_show"
translation_description="In the 'Stats settings' dialog, the section label to show additional
stats.">
Show
</string>
<string name="stats_settings_grade"
translation_description="In the 'Stats settings' dialog, the option to show grade. Grade is
the amount of inclination to the horizontal, also known as slope or incline.">
Grade
</string>
<string name="stats_settings_coordinate"
translation_description="In the 'Stats settings' dialog, the option to show latitude and
longitude.">
Latitude/Longitude
</string>
<string name="stats_settings_time"
translation_description="In the 'Stats settings' dialog, the section label to choose between
displaying total time or moving time.">
Time
</string>
<!-- Track -->
<string name="track_detail_chart_tab"
translation_description="In the track detail page, the title of the tab showing the chart.">