mirror of
https://github.com/oliexdev/openScale.git
synced 2025-08-18 14:31:23 +02:00
change color depending on if you are going towards or away from your weight goal, see issue #395
This commit is contained in:
@@ -445,6 +445,15 @@ public abstract class FloatMeasurementView extends MeasurementView {
|
||||
color = Color.GRAY;
|
||||
}
|
||||
|
||||
// change color depending on if you are going towards or away from your weight goal
|
||||
if (this instanceof WeightMeasurementView) {
|
||||
if (diff> 0.0f) {
|
||||
color = (value > getScaleUser().getGoalWeight()) ? Color.RED : Color.GREEN;
|
||||
} else if (diff < 0.0f) {
|
||||
color = (value < getScaleUser().getGoalWeight()) ? Color.RED : Color.GREEN;
|
||||
}
|
||||
}
|
||||
|
||||
if (newLine) {
|
||||
text.append('\n');
|
||||
}
|
||||
|
Reference in New Issue
Block a user