Skip to content

Commit f29d229

Browse files
authored
fix: revert color in thermometer (#2137)
* added a else statement to revert the color * Added the space after else and added a new color in colors.xml * minor change
1 parent a49e6b7 commit f29d229

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

app/src/main/java/io/pslab/fragment/ThermometerDataFragment.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,9 @@ private void visualizeData() {
488488
thermometer.setSpeedAt(tempValue);
489489
if (tempValue > highLimit)
490490
thermometer.setBackgroundCircleColor(Color.RED);
491+
else {
492+
thermometer.setBackgroundCircleColor(getResources().getColor(R.color.primaryBlue));
493+
}
491494

492495
timeElapsed = ((System.currentTimeMillis() - startTime) / updatePeriod);
493496
if (timeElapsed != previousTimeElapsed) {

app/src/main/res/values/colors.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
<color name="gray">#F2ECEC</color>
99
<color name="black">#000000</color>
1010
<color name="background">#FAFAFA</color>
11+
<color name="primaryBlue">#FF48CCE9</color>
1112

1213
<!-- Power Source Colors -->
1314
<color name="back_circle_color">#EDEDED</color>

0 commit comments

Comments
 (0)