Added intervals in StatisticsRecordedFragment with distance, speed and pace for all activity types.

Users can select the length of the interval (in a spinner with several options).
The intervals will be in km or mi depending on settings.
This commit is contained in:
Román
2020-08-10 19:16:23 +02:00
committed by Román Martínez
parent 19e35a7609
commit 7a923a947e
10 changed files with 482 additions and 1 deletions
@@ -0,0 +1,88 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/StatsSmallLabel"
android:text="@string/stats_intervals" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginBottom="8dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/stats_split_interval"
style="@style/TextMedium" />
<Spinner
android:id="@+id/spinner_intervals"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/SpinnerCustom"/>
<TextView
android:id="@+id/spinner_intervals_unit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="@string/unit_kilometer"
style="@style/TextMedium" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginBottom="8dp">
<TextView
android:id="@+id/interval_distance"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
style="@style/TextMedium"
android:layout_margin="1dp"
android:textAlignment="center"
android:layout_gravity="center"
android:text="@string/stats_distance" />
<TextView
android:id="@+id/interval_speed"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
style="@style/TextMedium"
android:layout_margin="1dp"
android:textAlignment="center"
android:layout_gravity="center"
android:text="@string/stats_speed" />
<TextView
android:id="@+id/interval_pace"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
style="@style/TextMedium"
android:layout_margin="1dp"
android:textAlignment="center"
android:layout_gravity="center"
android:text="@string/stats_pace" />
</LinearLayout>
<LinearLayout
android:id="@+id/interval_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"/>
</LinearLayout>