show recording paused time in track statistics
This commit is contained in:
parent
b71062e492
commit
3c4f4f36a5
3 changed files with 40 additions and 2 deletions
|
@ -75,6 +75,8 @@ data class TrackFragmentLayoutHolder(var context: Context, var inflater: LayoutI
|
||||||
private val durationView: MaterialTextView
|
private val durationView: MaterialTextView
|
||||||
private val recordingStartView: MaterialTextView
|
private val recordingStartView: MaterialTextView
|
||||||
private val recordingStopView: MaterialTextView
|
private val recordingStopView: MaterialTextView
|
||||||
|
private val recordingPausedView: MaterialTextView
|
||||||
|
private val recordingPausedLabelView: MaterialTextView
|
||||||
private val maxAltitudeView: MaterialTextView
|
private val maxAltitudeView: MaterialTextView
|
||||||
private val minAltitudeView: MaterialTextView
|
private val minAltitudeView: MaterialTextView
|
||||||
private val positiveElevationView: MaterialTextView
|
private val positiveElevationView: MaterialTextView
|
||||||
|
@ -112,6 +114,8 @@ data class TrackFragmentLayoutHolder(var context: Context, var inflater: LayoutI
|
||||||
durationView = rootView.findViewById(R.id.statistics_data_duration)
|
durationView = rootView.findViewById(R.id.statistics_data_duration)
|
||||||
recordingStartView = rootView.findViewById(R.id.statistics_data_recording_start)
|
recordingStartView = rootView.findViewById(R.id.statistics_data_recording_start)
|
||||||
recordingStopView = rootView.findViewById(R.id.statistics_data_recording_stop)
|
recordingStopView = rootView.findViewById(R.id.statistics_data_recording_stop)
|
||||||
|
recordingPausedLabelView = rootView.findViewById(R.id.statistics_p_recording_paused)
|
||||||
|
recordingPausedView = rootView.findViewById(R.id.statistics_data_recording_paused)
|
||||||
maxAltitudeView = rootView.findViewById(R.id.statistics_data_max_altitude)
|
maxAltitudeView = rootView.findViewById(R.id.statistics_data_max_altitude)
|
||||||
minAltitudeView = rootView.findViewById(R.id.statistics_data_min_altitude)
|
minAltitudeView = rootView.findViewById(R.id.statistics_data_min_altitude)
|
||||||
positiveElevationView = rootView.findViewById(R.id.statistics_data_positive_elevation)
|
positiveElevationView = rootView.findViewById(R.id.statistics_data_positive_elevation)
|
||||||
|
@ -186,6 +190,16 @@ data class TrackFragmentLayoutHolder(var context: Context, var inflater: LayoutI
|
||||||
positiveElevationView.text = LengthUnitHelper.convertDistanceToString(track.positiveElevation, useImperialUnits)
|
positiveElevationView.text = LengthUnitHelper.convertDistanceToString(track.positiveElevation, useImperialUnits)
|
||||||
negativeElevationView.text = LengthUnitHelper.convertDistanceToString(track.negativeElevation, useImperialUnits)
|
negativeElevationView.text = LengthUnitHelper.convertDistanceToString(track.negativeElevation, useImperialUnits)
|
||||||
|
|
||||||
|
// show / hide recording pause
|
||||||
|
if (track.recordingPaused != 0L) {
|
||||||
|
recordingPausedLabelView.visibility = View.VISIBLE
|
||||||
|
recordingPausedView.visibility = View.VISIBLE
|
||||||
|
recordingPausedView.text = DateTimeHelper.convertToReadableTime(context, track.recordingPaused)
|
||||||
|
} else {
|
||||||
|
recordingPausedLabelView.visibility = View.GONE
|
||||||
|
recordingPausedView.visibility = View.GONE
|
||||||
|
}
|
||||||
|
|
||||||
// inform user about possible accuracy issues with altitude measurements
|
// inform user about possible accuracy issues with altitude measurements
|
||||||
elevationDataViews.referencedIds.forEach { id ->
|
elevationDataViews.referencedIds.forEach { id ->
|
||||||
(rootView.findViewById(id) as View).setOnClickListener{
|
(rootView.findViewById(id) as View).setOnClickListener{
|
||||||
|
|
|
@ -174,8 +174,8 @@
|
||||||
android:text="@string/statistics_sheet_p_recording_start"
|
android:text="@string/statistics_sheet_p_recording_start"
|
||||||
android:textAppearance="@style/TextAppearance.MaterialComponents.Body2"
|
android:textAppearance="@style/TextAppearance.MaterialComponents.Body2"
|
||||||
android:textColor="@color/text_lightweight"
|
android:textColor="@color/text_lightweight"
|
||||||
app:layout_constraintStart_toStartOf="@+id/statistics_p_duration"
|
app:layout_constraintStart_toStartOf="@+id/statistics_p_recording_paused"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/statistics_p_duration" />
|
app:layout_constraintTop_toBottomOf="@+id/statistics_p_recording_paused" />
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
<com.google.android.material.textview.MaterialTextView
|
||||||
android:id="@+id/statistics_data_recording_start"
|
android:id="@+id/statistics_data_recording_start"
|
||||||
|
@ -212,6 +212,29 @@
|
||||||
app:layout_constraintTop_toTopOf="@+id/statistics_p_recording_stop"
|
app:layout_constraintTop_toTopOf="@+id/statistics_p_recording_stop"
|
||||||
tools:text="@string/sample_text_default_data" />
|
tools:text="@string/sample_text_default_data" />
|
||||||
|
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:id="@+id/statistics_data_recording_paused"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:textAppearance="@style/TextAppearance.MaterialComponents.Body1"
|
||||||
|
android:textColor="@color/text_default"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@+id/statistics_p_recording_paused"
|
||||||
|
app:layout_constraintStart_toEndOf="@+id/statistics_p_recording_paused"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/statistics_p_recording_paused"
|
||||||
|
tools:text="@string/sample_text_default_data" />
|
||||||
|
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:id="@+id/statistics_p_recording_paused"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:text="@string/statistics_sheet_p_recording_paused"
|
||||||
|
android:textAppearance="@style/TextAppearance.MaterialComponents.Body2"
|
||||||
|
android:textColor="@color/text_lightweight"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/statistics_p_duration"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/statistics_p_duration" />
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
<com.google.android.material.textview.MaterialTextView
|
||||||
android:id="@+id/statistics_p_positive_elevation"
|
android:id="@+id/statistics_p_positive_elevation"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
|
|
@ -49,6 +49,7 @@
|
||||||
<string name="statistics_sheet_p_steps_no_pedometer">pedometer not available</string>
|
<string name="statistics_sheet_p_steps_no_pedometer">pedometer not available</string>
|
||||||
<string name="statistics_sheet_p_waypoints">Recorded waypoints:</string>
|
<string name="statistics_sheet_p_waypoints">Recorded waypoints:</string>
|
||||||
<string name="statistics_sheet_p_duration">Total duration:</string>
|
<string name="statistics_sheet_p_duration">Total duration:</string>
|
||||||
|
<string name="statistics_sheet_p_recording_paused">Recording paused:</string>
|
||||||
<string name="statistics_sheet_p_recording_start">Recording started:</string>
|
<string name="statistics_sheet_p_recording_start">Recording started:</string>
|
||||||
<string name="statistics_sheet_p_recording_stop">Recording stopped:</string>
|
<string name="statistics_sheet_p_recording_stop">Recording stopped:</string>
|
||||||
<string name="statistics_sheet_p_max_altitude">Highest waypoint:</string>
|
<string name="statistics_sheet_p_max_altitude">Highest waypoint:</string>
|
||||||
|
|
Loading…
Reference in a new issue