Clean up prediction colors.

This commit is contained in:
Johannes Mockenhaupt 2018-05-01 19:16:28 +02:00
parent 73d7d98354
commit 5ef7506e5f
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1
9 changed files with 3 additions and 30 deletions

View file

@ -211,7 +211,7 @@ public class BgReading implements DataPointWithLabelInterface {
}
int color = MainApp.sResources.getColor(R.color.inrange);
if (isPrediction())
color = MainApp.sResources.getColor(R.color.prediction);
return getPredectionColor();
else if (valueToUnits(units) < lowLine)
color = MainApp.sResources.getColor(R.color.low);
else if (valueToUnits(units) > highLine)
@ -219,8 +219,7 @@ public class BgReading implements DataPointWithLabelInterface {
return color;
}
@Override
public int getSecondColor() {
private int getPredectionColor() {
if (isIOBPrediction)
return MainApp.sResources.getColor(R.color.iob);
if (isCOBPrediction)

View file

@ -263,9 +263,4 @@ public class CareportalEvent implements DataPointWithLabelInterface {
return Color.GRAY;
}
@Override
public int getSecondColor() {
return 0;
}
}

View file

@ -297,8 +297,4 @@ public class ExtendedBolus implements Interval, DataPointWithLabelInterface {
return Color.CYAN;
}
@Override
public int getSecondColor() {
return 0;
}
}

View file

@ -263,11 +263,6 @@ public class ProfileSwitch implements Interval, DataPointWithLabelInterface {
return Color.CYAN;
}
@Override
public int getSecondColor() {
return 0;
}
public String toString() {
return "ProfileSwitch{" +
"date=" + date +

View file

@ -164,9 +164,4 @@ public class AutosensData implements DataPointWithLabelInterface {
return MainApp.gc(R.color.cob);
}
@Override
public int getSecondColor() {
return 0;
}
}

View file

@ -55,5 +55,4 @@ public interface DataPointWithLabelInterface extends DataPointInterface{
PointsWithLabelGraphSeries.Shape getShape();
float getSize();
int getColor();
int getSecondColor();
}

View file

@ -211,7 +211,6 @@ public class PointsWithLabelGraphSeries<E extends DataPointWithLabelInterface> e
mPaint.setStyle(Paint.Style.FILL);
mPaint.setStrokeWidth(0);
canvas.drawCircle(endX, endY, scaledPxSize, mPaint);
mPaint.setColor(value.getSecondColor());
mPaint.setStyle(Paint.Style.FILL);
mPaint.setStrokeWidth(0);
canvas.drawCircle(endX, endY, scaledPxSize / 3, mPaint);

View file

@ -193,11 +193,6 @@ public class Treatment implements DataPointWithLabelInterface {
return MainApp.instance().getResources().getColor(android.R.color.holo_red_light);
}
@Override
public int getSecondColor() {
return 0;
}
@Override
public void setY(double y) {
yValue = y;

View file

@ -6,7 +6,7 @@
<color name="bolus">#FFFFCC03</color>
<color name="cob">#FFFB8C00</color>
<color name="uam">#ffea00</color>
<color name="zt">#ff9500</color>
<color name="zt">#00ffff</color>
<color name="ratio">#FFFFFF</color>
<color name="devslopepos">#FFFFFF00</color>
<color name="devslopeneg">#FFFF00FF</color>