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
+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>