final fix for cgm color
This commit is contained in:
parent
91c1260990
commit
b0e50119df
4 changed files with 17 additions and 2 deletions
|
@ -5,8 +5,9 @@ import android.app.NotificationManager
|
|||
import android.content.ActivityNotFoundException
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.graphics.Color
|
||||
import android.graphics.Paint
|
||||
import android.graphics.PorterDuff
|
||||
import android.graphics.PorterDuffColorFilter
|
||||
import android.graphics.drawable.AnimationDrawable
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
|
@ -560,9 +561,17 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList
|
|||
binding.buttonsLayout.calibrationButton.visibility = (xDripIsBgSource && actualBG != null && sp.getBoolean(R.string.key_show_calibration_button, true)).toVisibility()
|
||||
if (dexcomIsSource) {
|
||||
binding.buttonsLayout.cgmButton.setCompoundDrawablesWithIntrinsicBounds(null, rh.gd(R.drawable.ic_byoda), null, null)
|
||||
for (drawable in binding.buttonsLayout.cgmButton.compoundDrawables) {
|
||||
drawable?.mutate()
|
||||
drawable?.colorFilter = PorterDuffColorFilter(rh.gac( context,R.attr.cgmdexColor ), PorterDuff.Mode.SRC_IN)
|
||||
}
|
||||
binding.buttonsLayout.cgmButton.setTextColor(rh.gac(context, R.attr.cgmdexColor))
|
||||
} else if (xDripIsBgSource) {
|
||||
binding.buttonsLayout.cgmButton.setCompoundDrawablesWithIntrinsicBounds(null, rh.gd(R.drawable.ic_xdrip), null, null)
|
||||
for (drawable in binding.buttonsLayout.cgmButton.compoundDrawables) {
|
||||
drawable?.mutate()
|
||||
drawable?.colorFilter = PorterDuffColorFilter(rh.gac( context,R.attr.cgmxdripColor ), PorterDuff.Mode.SRC_IN)
|
||||
}
|
||||
binding.buttonsLayout.cgmButton.setTextColor(rh.gac(context, R.attr.cgmxdripColor))
|
||||
}
|
||||
binding.buttonsLayout.cgmButton.visibility = (sp.getBoolean(R.string.key_show_cgm_button, false) && (xDripIsBgSource || dexcomIsSource)).toVisibility()
|
||||
|
|
|
@ -4,6 +4,6 @@
|
|||
android:viewportHeight="24"
|
||||
android:viewportWidth="24"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="?attr/icCalibrationColor"
|
||||
<path android:fillColor="@color/calibration"
|
||||
android:pathData="M12.143,3.619c1.326,1.335 2.613,2.639 3.908,3.934c0.86,0.86 1.735,1.695 2.294,2.811c1.242,2.477 0.847,5.53 -1.039,7.698c-1.763,2.026 -4.813,2.845 -7.35,1.973c-4.996,-1.716 -6.424,-7.776 -2.71,-11.543C8.837,6.878 10.458,5.294 12.143,3.619zM12.08,6.135c-1.258,1.251 -2.447,2.427 -3.628,3.61c-1.148,1.149 -1.65,2.542 -1.541,4.158c0.177,2.618 2.665,4.888 5.169,4.688C12.08,14.471 12.08,10.35 12.08,6.135z"/>
|
||||
</vector>
|
||||
|
|
|
@ -63,6 +63,9 @@
|
|||
<color name="examinedProfile">#FFFF5555</color>
|
||||
<color name="defaulttext">#BBBBBB</color>
|
||||
|
||||
<!-- Datepicker-->
|
||||
<color name="dateTimePickerBackground">@color/buttonBackground</color>
|
||||
|
||||
<!-- Treatment-->
|
||||
<color name="tempbasal">#C803A9F4</color>
|
||||
<color name="list_delimiter">#505050</color>
|
||||
|
|
|
@ -64,6 +64,9 @@
|
|||
<color name="examinedProfile">#FFFF5555</color>
|
||||
<color name="defaulttext">#BBBBBB</color>
|
||||
|
||||
<!-- Datepicker-->
|
||||
<color name="dateTimePickerBackground">@color/white</color>
|
||||
|
||||
<!-- Treatment-->
|
||||
<color name="tempbasal">#C803A9F4</color>
|
||||
<color name="list_delimiter">#505050</color>
|
||||
|
|
Loading…
Reference in a new issue