Clean up prediction colors.
This commit is contained in:
parent
73d7d98354
commit
5ef7506e5f
9 changed files with 3 additions and 30 deletions
|
@ -211,7 +211,7 @@ public class BgReading implements DataPointWithLabelInterface {
|
||||||
}
|
}
|
||||||
int color = MainApp.sResources.getColor(R.color.inrange);
|
int color = MainApp.sResources.getColor(R.color.inrange);
|
||||||
if (isPrediction())
|
if (isPrediction())
|
||||||
color = MainApp.sResources.getColor(R.color.prediction);
|
return getPredectionColor();
|
||||||
else if (valueToUnits(units) < lowLine)
|
else if (valueToUnits(units) < lowLine)
|
||||||
color = MainApp.sResources.getColor(R.color.low);
|
color = MainApp.sResources.getColor(R.color.low);
|
||||||
else if (valueToUnits(units) > highLine)
|
else if (valueToUnits(units) > highLine)
|
||||||
|
@ -219,8 +219,7 @@ public class BgReading implements DataPointWithLabelInterface {
|
||||||
return color;
|
return color;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
private int getPredectionColor() {
|
||||||
public int getSecondColor() {
|
|
||||||
if (isIOBPrediction)
|
if (isIOBPrediction)
|
||||||
return MainApp.sResources.getColor(R.color.iob);
|
return MainApp.sResources.getColor(R.color.iob);
|
||||||
if (isCOBPrediction)
|
if (isCOBPrediction)
|
||||||
|
|
|
@ -263,9 +263,4 @@ public class CareportalEvent implements DataPointWithLabelInterface {
|
||||||
return Color.GRAY;
|
return Color.GRAY;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getSecondColor() {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -297,8 +297,4 @@ public class ExtendedBolus implements Interval, DataPointWithLabelInterface {
|
||||||
return Color.CYAN;
|
return Color.CYAN;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getSecondColor() {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -263,11 +263,6 @@ public class ProfileSwitch implements Interval, DataPointWithLabelInterface {
|
||||||
return Color.CYAN;
|
return Color.CYAN;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getSecondColor() {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "ProfileSwitch{" +
|
return "ProfileSwitch{" +
|
||||||
"date=" + date +
|
"date=" + date +
|
||||||
|
|
|
@ -164,9 +164,4 @@ public class AutosensData implements DataPointWithLabelInterface {
|
||||||
return MainApp.gc(R.color.cob);
|
return MainApp.gc(R.color.cob);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getSecondColor() {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,5 +55,4 @@ public interface DataPointWithLabelInterface extends DataPointInterface{
|
||||||
PointsWithLabelGraphSeries.Shape getShape();
|
PointsWithLabelGraphSeries.Shape getShape();
|
||||||
float getSize();
|
float getSize();
|
||||||
int getColor();
|
int getColor();
|
||||||
int getSecondColor();
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -211,7 +211,6 @@ public class PointsWithLabelGraphSeries<E extends DataPointWithLabelInterface> e
|
||||||
mPaint.setStyle(Paint.Style.FILL);
|
mPaint.setStyle(Paint.Style.FILL);
|
||||||
mPaint.setStrokeWidth(0);
|
mPaint.setStrokeWidth(0);
|
||||||
canvas.drawCircle(endX, endY, scaledPxSize, mPaint);
|
canvas.drawCircle(endX, endY, scaledPxSize, mPaint);
|
||||||
mPaint.setColor(value.getSecondColor());
|
|
||||||
mPaint.setStyle(Paint.Style.FILL);
|
mPaint.setStyle(Paint.Style.FILL);
|
||||||
mPaint.setStrokeWidth(0);
|
mPaint.setStrokeWidth(0);
|
||||||
canvas.drawCircle(endX, endY, scaledPxSize / 3, mPaint);
|
canvas.drawCircle(endX, endY, scaledPxSize / 3, mPaint);
|
||||||
|
|
|
@ -193,11 +193,6 @@ public class Treatment implements DataPointWithLabelInterface {
|
||||||
return MainApp.instance().getResources().getColor(android.R.color.holo_red_light);
|
return MainApp.instance().getResources().getColor(android.R.color.holo_red_light);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getSecondColor() {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setY(double y) {
|
public void setY(double y) {
|
||||||
yValue = y;
|
yValue = y;
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<color name="bolus">#FFFFCC03</color>
|
<color name="bolus">#FFFFCC03</color>
|
||||||
<color name="cob">#FFFB8C00</color>
|
<color name="cob">#FFFB8C00</color>
|
||||||
<color name="uam">#ffea00</color>
|
<color name="uam">#ffea00</color>
|
||||||
<color name="zt">#ff9500</color>
|
<color name="zt">#00ffff</color>
|
||||||
<color name="ratio">#FFFFFF</color>
|
<color name="ratio">#FFFFFF</color>
|
||||||
<color name="devslopepos">#FFFFFF00</color>
|
<color name="devslopepos">#FFFFFF00</color>
|
||||||
<color name="devslopeneg">#FFFF00FF</color>
|
<color name="devslopeneg">#FFFF00FF</color>
|
||||||
|
|
Loading…
Reference in a new issue