diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewFragment.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewFragment.kt index 130caeb51c..8f5cadc882 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewFragment.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewFragment.kt @@ -554,6 +554,13 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList val xDripIsBgSource = xdripPlugin.isEnabled() val dexcomIsSource = dexcomPlugin.isEnabled() binding.buttonsLayout.calibrationButton.visibility = ((xDripIsBgSource || dexcomIsSource) && 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) + binding.buttonsLayout.cgmButton.setTextColor(rh.gc(R.color.white)) + } else if (xDripIsBgSource) { + binding.buttonsLayout.cgmButton.setCompoundDrawablesWithIntrinsicBounds(null, rh.gd(R.drawable.ic_xdrip), null, null) + binding.buttonsLayout.cgmButton.setTextColor(rh.gc(R.color.colorCalibrationButton)) + } binding.buttonsLayout.cgmButton.visibility = (sp.getBoolean(R.string.key_show_cgm_button, false) && (xDripIsBgSource || dexcomIsSource)).toVisibility() // Automation buttons diff --git a/app/src/main/res/drawable/ic_byoda.xml b/app/src/main/res/drawable/ic_byoda.xml new file mode 100644 index 0000000000..1cb312cfb3 --- /dev/null +++ b/app/src/main/res/drawable/ic_byoda.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 3185c9652b..5c11c93572 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -648,8 +648,8 @@ show_wizard_button show_insulin_button show_treatment_button - Sends a calibration to xDrip+ or open G5 calibration dialog - Opens xDrip+, back buttons returns to AAPS + Sends a calibration to xDrip+ or open BYODA calibration dialog + Opens xDrip+ or BYODA, back buttons returns to AAPS insulin_button_increment_1 insulin_button_increment_2 insulin_button_increment_3 diff --git a/icons/byoda.svg b/icons/byoda.svg new file mode 100644 index 0000000000..4feefdb599 --- /dev/null +++ b/icons/byoda.svg @@ -0,0 +1,9 @@ + + + + + +