mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2026-07-31 07:44:24 +02:00
Workout details: Adjust default charts line colors
This commit is contained in:
+4
-4
@@ -54,25 +54,25 @@ public class DefaultWorkoutCharts {
|
||||
|
||||
if (!heartRateDataPoints.isEmpty()) {
|
||||
final String label = String.format("%s(%s)", context.getString(R.string.heart_rate), getUnitString(context, UNIT_BPM));
|
||||
final LineDataSet dataset = createDataSet(context, heartRateDataPoints, label, Color.RED);
|
||||
final LineDataSet dataset = createDataSet(context, heartRateDataPoints, label, context.getResources().getColor(R.color.chart_line_heart_rate));
|
||||
charts.add(new WorkoutChart(context.getString(R.string.heart_rate), ActivitySummaryEntries.GROUP_HEART_RATE, new LineData(dataset)));
|
||||
}
|
||||
|
||||
if (hasSpeedValues && !speedDataPoints.isEmpty()) {
|
||||
if (ActivityKind.isPaceActivity(activityKind)) {
|
||||
final String label = String.format("%s (%s)", context.getString(R.string.Pace), getUnitString(context, UNIT_SECONDS_PER_KM));
|
||||
final LineDataSet dataset = createDataSet(context, speedDataPoints, label, Color.BLUE);
|
||||
final LineDataSet dataset = createDataSet(context, speedDataPoints, label, context.getResources().getColor(R.color.chart_line_speed));
|
||||
charts.add(new WorkoutChart(context.getString(R.string.Pace), ActivitySummaryEntries.GROUP_SPEED, new LineData(dataset), new SpeedYLabelFormatter(UNIT_SECONDS_PER_KM)));
|
||||
} else {
|
||||
final String label = String.format("%s (%s)", context.getString(R.string.Speed), getUnitString(context, UNIT_METERS_PER_SECOND));
|
||||
final LineDataSet dataset = createDataSet(context, speedDataPoints, label, Color.BLUE);
|
||||
final LineDataSet dataset = createDataSet(context, speedDataPoints, label, context.getResources().getColor(R.color.chart_line_speed));
|
||||
charts.add(new WorkoutChart(context.getString(R.string.Speed), ActivitySummaryEntries.GROUP_SPEED, new LineData(dataset), new SpeedYLabelFormatter(UNIT_METERS_PER_SECOND)));
|
||||
}
|
||||
}
|
||||
|
||||
if (!elevationDataPoints.isEmpty()) {
|
||||
final String label = String.format("%s (%s)", context.getString(R.string.Elevation), getUnitString(context, UNIT_METERS));
|
||||
LineDataSet dataset = createDataSet(context, elevationDataPoints, label, Color.GREEN);
|
||||
LineDataSet dataset = createDataSet(context, elevationDataPoints, label, context.getResources().getColor(R.color.chart_line_elevation));
|
||||
charts.add(new WorkoutChart(context.getString(R.string.Elevation), ActivitySummaryEntries.GROUP_ELEVATION, new LineData(dataset)));
|
||||
}
|
||||
|
||||
|
||||
@@ -89,6 +89,10 @@
|
||||
<color name="hr_zone_threshold_color" type="color">#FF7043</color>
|
||||
<color name="hr_zone_maximum_color" type="color">#F44336</color>
|
||||
|
||||
<color name="chart_line_speed" type="color">#80D8FF</color>
|
||||
<color name="chart_line_elevation" type="color">#66BB6A</color>
|
||||
<color name="chart_line_heart_rate" type="color">#F44336</color>
|
||||
|
||||
<attr name="row_separator" format="color" />
|
||||
<color name="alternate_row_background_light">#FFEDEDED</color>
|
||||
<color name="alternate_row_background_dark">#545254</color>
|
||||
|
||||
Reference in New Issue
Block a user