forked from upstream-mirrors/OpenTracks
Update stats view layout
This commit is contained in:
@@ -15,7 +15,7 @@ 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" >
|
||||
style="@style/StatsScrollView" >
|
||||
<LinearLayout
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
@@ -44,14 +44,7 @@ limitations under the License.
|
||||
<TextView
|
||||
android:text="@string/marker_detail_statistics_title"
|
||||
style="@style/TextLarge.WithTopMargin" />
|
||||
<TableLayout
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:paddingTop="8dp"
|
||||
android:shrinkColumns="0,2"
|
||||
android:stretchColumns="0,2" >
|
||||
<include layout="@layout/stats_core" />
|
||||
</TableLayout>
|
||||
<include layout="@layout/stats_content" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
@@ -15,42 +15,13 @@ 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" >
|
||||
<TableLayout
|
||||
style="@style/StatsScrollView" >
|
||||
<LinearLayout
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:padding="8dp"
|
||||
android:shrinkColumns="0,2"
|
||||
android:stretchColumns="0,2" >
|
||||
<!-- Speed on one line -->
|
||||
<TableRow>
|
||||
<TextView
|
||||
android:id="@+id/stats_speed_label"
|
||||
style="@style/StatsLabel" />
|
||||
</TableRow>
|
||||
<TableRow>
|
||||
<TextView
|
||||
android:id="@+id/stats_speed_value"
|
||||
style="@style/StatsValue" />
|
||||
</TableRow>
|
||||
<include layout="@layout/stats_core" />
|
||||
<TableRow android:id="@+id/stats_coordinate_label_table_row" >
|
||||
<TextView
|
||||
android:text="@string/stats_latitude"
|
||||
style="@style/StatsLabel" />
|
||||
<TextView
|
||||
android:layout_column="2"
|
||||
android:text="@string/stats_longitude"
|
||||
style="@style/StatsLabel" />
|
||||
</TableRow>
|
||||
<TableRow android:id="@+id/stats_coordinate_value_table_row" >
|
||||
<TextView
|
||||
android:id="@+id/stats_latitude_value"
|
||||
style="@style/StatsValue" />
|
||||
<TextView style="@style/StatsSpacer" />
|
||||
<TextView
|
||||
android:id="@+id/stats_longitude_value"
|
||||
style="@style/StatsValue" />
|
||||
</TableRow>
|
||||
</TableLayout>
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingRight="8dp" >
|
||||
<include layout="@layout/stats_content" />
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
@@ -0,0 +1,132 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright 2013 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.
|
||||
-->
|
||||
<merge xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<!-- Row 1: distance and speed -->
|
||||
<LinearLayout
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="match_parent" >
|
||||
<include
|
||||
android:id="@+id/stats_distance"
|
||||
layout="@layout/stats_large_item" />
|
||||
<View style="@style/StatsVerticalSpacer" />
|
||||
<include
|
||||
android:id="@+id/stats_speed"
|
||||
layout="@layout/stats_large_item" />
|
||||
</LinearLayout>
|
||||
<!-- Row 2: total time and average speed -->
|
||||
<LinearLayout
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="match_parent" >
|
||||
<include
|
||||
android:id="@+id/stats_total_time"
|
||||
layout="@layout/stats_large_item" />
|
||||
<View style="@style/StatsVerticalSpacer" />
|
||||
<include
|
||||
android:id="@+id/stats_average_speed"
|
||||
layout="@layout/stats_large_item" />
|
||||
</LinearLayout>
|
||||
<!-- Row 3: horizontal line -->
|
||||
<View style="@style/StatsHorizontalLine" />
|
||||
<!-- Row 3: moving time and average moving speed -->
|
||||
<LinearLayout
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="match_parent" >
|
||||
<include
|
||||
android:id="@+id/stats_moving_time"
|
||||
layout="@layout/stats_small_item" />
|
||||
<View style="@style/StatsVerticalSpacer" />
|
||||
<include
|
||||
android:id="@+id/stats_average_moving_time"
|
||||
layout="@layout/stats_small_item" />
|
||||
</LinearLayout>
|
||||
<!-- Row 4: empty and max speed -->
|
||||
<LinearLayout
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="match_parent" >
|
||||
<LinearLayout style="@style/StatsSmallItemContainer" />
|
||||
<View style="@style/StatsVerticalSpacer" />
|
||||
<include
|
||||
android:id="@+id/stats_max_speed"
|
||||
layout="@layout/stats_small_item" />
|
||||
</LinearLayout>
|
||||
<!-- Row 5: horizontal line -->
|
||||
<View
|
||||
android:id="@+id/stats_grade_elevation_horizontal_line"
|
||||
style="@style/StatsHorizontalLine" />
|
||||
<!-- Row 5: grade and elevation -->
|
||||
<LinearLayout
|
||||
android:id="@+id/stats_grade_elevation_container"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="match_parent" >
|
||||
<!-- Grade -->
|
||||
<LinearLayout style="@style/StatsSmallItemContainer" >
|
||||
<!-- Grade label -->
|
||||
<TextView
|
||||
android:text="@string/stats_grade"
|
||||
style="@style/StatsSmallLabel" />
|
||||
<!-- Grade min -->
|
||||
<include
|
||||
android:id="@+id/stats_grade_min"
|
||||
layout="@layout/stats_small_item_1line" />
|
||||
<!-- Grade max -->
|
||||
<include
|
||||
android:id="@+id/stats_grade_max"
|
||||
layout="@layout/stats_small_item_1line" />
|
||||
</LinearLayout>
|
||||
<View style="@style/StatsVerticalSpacer" />
|
||||
<!-- Elevation -->
|
||||
<LinearLayout style="@style/StatsSmallItemContainer" >
|
||||
<!-- Elevation label -->
|
||||
<TextView
|
||||
android:text="@string/stats_elevation"
|
||||
style="@style/StatsSmallLabel" />
|
||||
<!-- Elevation -->
|
||||
<include
|
||||
android:id="@+id/stats_elevation"
|
||||
layout="@layout/stats_small_item_1line" />
|
||||
<!-- Elevation gain -->
|
||||
<include
|
||||
android:id="@+id/stats_elevation_gain"
|
||||
layout="@layout/stats_small_item_1line" />
|
||||
<!-- Elevation min -->
|
||||
<include
|
||||
android:id="@+id/stats_elevation_min"
|
||||
layout="@layout/stats_small_item_1line" />
|
||||
<!-- Elevation max -->
|
||||
<include
|
||||
android:id="@+id/stats_elevation_max"
|
||||
layout="@layout/stats_small_item_1line" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
<!-- Row 6: horizontal line -->
|
||||
<View
|
||||
android:id="@+id/stats_coordinate_horizontal_line"
|
||||
style="@style/StatsHorizontalLine" />
|
||||
<!-- Row 6: latitude and longitude -->
|
||||
<LinearLayout
|
||||
android:id="@+id/stats_coordinate_container"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="match_parent" >
|
||||
<include
|
||||
android:id="@+id/stats_latitude"
|
||||
layout="@layout/stats_small_item" />
|
||||
<View style="@style/StatsVerticalSpacer" />
|
||||
<include
|
||||
android:id="@+id/stats_longitude"
|
||||
layout="@layout/stats_small_item" />
|
||||
</LinearLayout>
|
||||
</merge>
|
||||
@@ -1,140 +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.
|
||||
-->
|
||||
<merge xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<!-- Total distance -->
|
||||
<TableRow>
|
||||
<TextView
|
||||
android:text="@string/stats_distance"
|
||||
style="@style/StatsLabel" />
|
||||
</TableRow>
|
||||
<TableRow>
|
||||
<TextView
|
||||
android:id="@+id/stats_distance_value"
|
||||
style="@style/StatsValue" />
|
||||
</TableRow>
|
||||
<!-- Total time/moving time -->
|
||||
<TableRow>
|
||||
<TextView
|
||||
android:text="@string/stats_total_time"
|
||||
style="@style/StatsLabel" />
|
||||
<TextView
|
||||
android:id="@+id/stats_moving_time_label"
|
||||
android:layout_column="2"
|
||||
android:text="@string/stats_moving_time"
|
||||
style="@style/StatsLabel" />
|
||||
</TableRow>
|
||||
<TableRow>
|
||||
<TextView
|
||||
android:id="@+id/stats_total_time_value"
|
||||
style="@style/StatsValue" />
|
||||
<TextView
|
||||
android:id="@+id/stats_moving_time_spacer"
|
||||
style="@style/StatsSpacer" />
|
||||
<TextView
|
||||
android:id="@+id/stats_moving_time_value"
|
||||
style="@style/StatsValue" />
|
||||
</TableRow>
|
||||
<!-- Average speed/average moving speed (average pace/average moving pace) -->
|
||||
<TableRow>
|
||||
<TextView
|
||||
android:id="@+id/stats_average_speed_label"
|
||||
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_average_speed_value"
|
||||
style="@style/StatsValue" />
|
||||
<TextView
|
||||
android:id="@+id/stats_average_moving_speed_spacer"
|
||||
style="@style/StatsSpacer" />
|
||||
<TextView
|
||||
android:id="@+id/stats_average_moving_speed_value"
|
||||
style="@style/StatsValue" />
|
||||
</TableRow>
|
||||
<!-- Max speed (fastest pace) -->
|
||||
<TableRow>
|
||||
<TextView
|
||||
android:id="@+id/stats_max_speed_label"
|
||||
style="@style/StatsLabel" />
|
||||
</TableRow>
|
||||
<TableRow>
|
||||
<TextView
|
||||
android:id="@+id/stats_max_speed_value"
|
||||
style="@style/StatsValue" />
|
||||
</TableRow>
|
||||
<!-- Elevation and elevation gain -->
|
||||
<TableRow android:id="@+id/stats_elevation_label_table_row1" >
|
||||
<TextView
|
||||
android:text="@string/stats_elevation"
|
||||
style="@style/StatsLabel" />
|
||||
<TextView
|
||||
android:layout_column="2"
|
||||
android:text="@string/stats_elevation_gain"
|
||||
style="@style/StatsLabel" />
|
||||
</TableRow>
|
||||
<TableRow android:id="@+id/stats_elevation_value_table_row1" >
|
||||
<TextView
|
||||
android:id="@+id/stats_elevation_value"
|
||||
style="@style/StatsValue" />
|
||||
<TextView style="@style/StatsSpacer" />
|
||||
<TextView
|
||||
android:id="@+id/stats_elevation_gain_value"
|
||||
style="@style/StatsValue" />
|
||||
</TableRow>
|
||||
<!-- Min and max elevation -->
|
||||
<TableRow android:id="@+id/stats_elevation_label_table_row2" >
|
||||
<TextView
|
||||
android:text="@string/stats_min_elevation"
|
||||
style="@style/StatsLabel" />
|
||||
<TextView
|
||||
android:layout_column="2"
|
||||
android:text="@string/stats_max_elevation"
|
||||
style="@style/StatsLabel" />
|
||||
</TableRow>
|
||||
<TableRow android:id="@+id/stats_elevation_value_table_row2" >
|
||||
<TextView
|
||||
android:id="@+id/stats_min_elevation_value"
|
||||
style="@style/StatsValue" />
|
||||
<TextView style="@style/StatsSpacer" />
|
||||
<TextView
|
||||
android:id="@+id/stats_max_elevation_value"
|
||||
style="@style/StatsValue" />
|
||||
</TableRow>
|
||||
<!-- Min and max grade -->
|
||||
<TableRow android:id="@+id/stats_grade_label_table_row" >
|
||||
<TextView
|
||||
android:text="@string/stats_min_grade"
|
||||
style="@style/StatsLabel" />
|
||||
<TextView
|
||||
android:layout_column="2"
|
||||
android:text="@string/stats_max_grade"
|
||||
style="@style/StatsLabel" />
|
||||
</TableRow>
|
||||
<TableRow android:id="@+id/stats_grade_value_table_row" >
|
||||
<TextView
|
||||
android:id="@+id/stats_min_grade_value"
|
||||
style="@style/StatsValue" />
|
||||
<TextView style="@style/StatsSpacer" />
|
||||
<TextView
|
||||
android:id="@+id/stats_max_grade_value"
|
||||
style="@style/StatsValue" />
|
||||
</TableRow>
|
||||
</merge>
|
||||
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright 2013 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.
|
||||
-->
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/stats_large_item_id"
|
||||
style="@style/StatsLargeItemContainer" >
|
||||
<!-- Distance label -->
|
||||
<TextView
|
||||
android:id="@+id/stats_label"
|
||||
style="@style/StatsLargeLabel" />
|
||||
<!-- Distance value -->
|
||||
<LinearLayout style="@style/StatsLargeValueContainer" >
|
||||
<TextView
|
||||
android:id="@+id/stats_value"
|
||||
style="@style/StatsLargeValue" />
|
||||
<TextView
|
||||
android:id="@+id/stats_unit"
|
||||
style="@style/StatsUnit" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright 2013 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.
|
||||
-->
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/stats_small_item_id"
|
||||
style="@style/StatsSmallItemContainer" >
|
||||
<TextView
|
||||
android:id="@+id/stats_label"
|
||||
style="@style/StatsSmallLabel" />
|
||||
<!-- Distance value -->
|
||||
<LinearLayout style="@style/StatsSmallValueContainer" >
|
||||
<TextView
|
||||
android:id="@+id/stats_value"
|
||||
style="@style/StatsSmallValue" />
|
||||
<TextView
|
||||
android:id="@+id/stats_unit"
|
||||
style="@style/StatsUnit" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
+16
-12
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright 2012 Google Inc.
|
||||
Copyright 2013 Google Inc.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
@@ -14,14 +14,18 @@ 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">
|
||||
<TableLayout
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:padding="8dp"
|
||||
android:shrinkColumns="0,2"
|
||||
android:stretchColumns="0,2" >
|
||||
<include layout="@layout/stats_core" />
|
||||
</TableLayout>
|
||||
</ScrollView>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/stats_small_1line_id"
|
||||
style="@style/StatsSmallValueContainer" >
|
||||
<TextView
|
||||
android:id="@+id/stats_value"
|
||||
style="@style/StatsSmallValue" />
|
||||
<TextView
|
||||
android:id="@+id/stats_unit"
|
||||
style="@style/StatsUnit" />
|
||||
<TextView
|
||||
android:id="@+id/stats_label"
|
||||
android:layout_gravity="bottom"
|
||||
android:paddingLeft="8dp"
|
||||
style="@style/StatsSmallLabel" />
|
||||
</LinearLayout>
|
||||
Reference in New Issue
Block a user