New field for recording layout: clock.

With this change fields can be: short, wide, clock short or clock wide.
Fixes #1015.
This commit is contained in:
Román Martínez
2021-11-13 18:38:56 +01:00
parent d4a3762641
commit b1032f898a
11 changed files with 97 additions and 18 deletions
+1 -1
View File
@@ -26,7 +26,7 @@
android:id="@+id/stats_layout"
android:layout_width="0dp"
android:layout_height="wrap_content"
layout="@layout/stats_item"
layout="@layout/stats_generic_item"
app:layout_constraintHorizontal_chainStyle="spread_inside"
app:layout_constraintStart_toEndOf="@id/stats_iv_drag_indicator"
app:layout_constraintEnd_toStartOf="@id/stats_icon_show_status"
+28
View File
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="16dp"
android:paddingTop="16dp">
<TextClock
android:id="@+id/stats_clock"
style="@style/StatsPrimaryValue"
android:value="@string/value_unknown"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
tools:text="00:00" />
<TextView
android:id="@+id/stats_description_main"
style="@style/StatsPrimaryLabel"
android:text="@string/stats_clock"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/stats_clock" />
</androidx.constraintlayout.widget.ConstraintLayout>
+5
View File
@@ -354,6 +354,7 @@
<string name="stats_custom_layout_cadence_key" translatable="false">cadence</string>
<string name="stats_custom_layout_average_cadence_key" translatable="false">average_cadence</string>
<string name="stats_custom_layout_power_key" translatable="false">power</string>
<string name="stats_custom_layout_clock_key" translatable="false">time</string>
<!--
Default dataFields for stats layout customization in a set of arrays.
Every array has two items:
@@ -433,6 +434,10 @@
<item>@string/stats_custom_layout_power_key</item>
<item>0,0,0</item>
</string-array>
<string-array name="stats_custom_layout_fields_default_value_18">
<item>@string/stats_custom_layout_clock_key</item>
<item>0,0,0</item>
</string-array>
<!-- Stats empty values -->
<string name="stats_empty_value_integer" translatable="false">0</string>
+1
View File
@@ -428,6 +428,7 @@ limitations under the License.
<string name="stats_sensors_heart_rate">Heart Rate</string>
<string name="stats_sensors_cadence">Cadence</string>
<string name="stats_sensors_power">Power</string>
<string name="stats_clock">Clock</string>
<!-- Track -->
<string name="track_name_format">Track %1$d</string>
<string name="track_recording_notification_accuracy">Location accuracy: %1$s</string>