mirror of
https://github.com/oliexdev/openScale.git
synced 2025-08-24 01:03:20 +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;
|
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) {
|
if (newLine) {
|
||||||
text.append('\n');
|
text.append('\n');
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user