+ _numSegsLabel.setText("" + stats.getNumSegments());
+ final boolean isMultiSegments = (stats.getNumSegments() > 1);
+ // Set visibility of third column accordingly
+ _movingDistanceLabel.setVisible(isMultiSegments);
+ _movingDurationLabel.setVisible(isMultiSegments || stats.getTimestampsOutOfSequence());
+ // FIXME: What to show if timestamps are out of sequence? Warning message?
+ _movingClimbLabel.setVisible(isMultiSegments);
+ _movingDescentLabel.setVisible(isMultiSegments);
+ _movingSpeedLabel.setVisible(isMultiSegments);
+ _movingPaceLabel.setVisible(isMultiSegments);
+ _movingGradientLabel.setVisible(isMultiSegments);
+ _movingVertSpeedLabel.setVisible(isMultiSegments);
+
+ // Total and moving distance in current units
+ final Unit distUnit = Config.getUnitSet().getDistanceUnit();
+ final String distUnitsStr = I18nManager.getText(distUnit.getShortnameKey());
+ _totalDistanceLabel.setText(DisplayUtils.roundedNumber(stats.getTotalDistance()) + " " + distUnitsStr);
+ _movingDistanceLabel.setText(DisplayUtils.roundedNumber(stats.getMovingDistance()) + " " + distUnitsStr);
+
+ // Duration
+ _totalDurationLabel.setText(DisplayUtils.buildDurationString(stats.getTotalDurationInSeconds()));
+ _movingDurationLabel.setText(DisplayUtils.buildDurationString(stats.getMovingDurationInSeconds()));
+
+ // Climb and descent
+ final Unit altUnit = Config.getUnitSet().getAltitudeUnit();
+ final String altUnitsStr = " " + I18nManager.getText(altUnit.getShortnameKey());
+ if (stats.getTotalAltitudeRange().hasRange()) {
+ _totalClimbLabel.setText(stats.getTotalAltitudeRange().getClimb(altUnit) + altUnitsStr);
+ _totalDescentLabel.setText(stats.getTotalAltitudeRange().getDescent(altUnit) + altUnitsStr);
+ }
+ else {
+ _totalClimbLabel.setText("");
+ _totalDescentLabel.setText("");
+ }
+ if (stats.getMovingAltitudeRange().hasRange()) {
+ _movingClimbLabel.setText(stats.getMovingAltitudeRange().getClimb(altUnit) + altUnitsStr);
+ _movingDescentLabel.setText(stats.getMovingAltitudeRange().getDescent(altUnit) + altUnitsStr);
+ }
+ else {
+ _movingClimbLabel.setText("");
+ _movingDescentLabel.setText("");
+ }
+
+ // Overall pace and speed
+ final String speedUnitsStr = I18nManager.getText(Config.getUnitSet().getSpeedUnit().getShortnameKey());
+ long numSecs = stats.getTotalDurationInSeconds();
+ double dist = stats.getTotalDistance();
+ if (numSecs > 0 && dist > 0)