Statistics recorded fragment shows activity's information (name, description, start datetime).

Re-arrange stats putting the focus on moving stats.
Fixes #566.
This commit is contained in:
Román Martínez
2021-03-06 17:18:47 +01:00
parent 5db3aa7ac1
commit 34eb7a833a
3 changed files with 227 additions and 150 deletions
@@ -161,6 +161,7 @@ public class StatisticsRecordedFragment extends Fragment {
sharedPreferenceChangeListener.onSharedPreferenceChanged(sharedPreferences, getString(R.string.stats_rate_key));
}
loadTrackDescription(track);
updateUI();
updateSensorUI();
}
@@ -168,6 +169,17 @@ public class StatisticsRecordedFragment extends Fragment {
}
}
private void loadTrackDescription(Track track) {
if (track == null) {
return;
}
viewBinding.statsNameValue.setText(track.getName());
viewBinding.statsDescriptionValue.setText(track.getDescription());
if (track.getTrackStatistics() != null) {
viewBinding.statsStartDatetimeValue.setText(StringUtils.formatDateTime(getContext(), track.getTrackStatistics().getStartTime()));
}
}
private void updateUI() {
// Set total distance
{