Elevation gain: make it optional as Float - and if null, then the UI just shows "-".

In TrackStatistics the elevation gain is now nullable.
This commit is contained in:
Dennis Guse
2020-09-05 12:36:12 +02:00
parent 6845ce4984
commit 5099118dd7
8 changed files with 48 additions and 28 deletions
@@ -136,7 +136,9 @@ public class DescriptionGenerator {
}
// Elevation gain
writeElevation(stats.getTotalElevationGain(), builder, R.string.description_elevation_gain, lineBreak);
if (stats.hasTotalElevationGain()) {
writeElevation(stats.getTotalElevationGain(), builder, R.string.description_elevation_gain, lineBreak);
}
// Recorded time
builder.append(context.getString(R.string.description_recorded_time, StringUtils.formatDateTime(context, stats.getStartTime_ms())));