Merge pull request #1041 from Philoul/New/CGM_Icon_and_string
Use xDrip+ or Dexcom icon for CGM button (not only xDrip+ icon) + update preference strings
This commit is contained in:
commit
a83eb1c456
4 changed files with 27 additions and 2 deletions
|
@ -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
|
||||
|
|
9
app/src/main/res/drawable/ic_byoda.xml
Normal file
9
app/src/main/res/drawable/ic_byoda.xml
Normal file
|
@ -0,0 +1,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="48dp"
|
||||
android:height="48dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:pathData="M12.107,3.666c-4.603,0 -8.335,3.732 -8.335,8.335s3.732,8.335 8.335,8.335s8.335,-3.731 8.335,-8.335V3.666H12.107zM12.107,18.335c-3.498,0 -6.334,-2.836 -6.334,-6.334c0,-3.498 2.836,-6.334 6.334,-6.334c3.498,0 6.334,2.836 6.334,6.334C18.442,15.499 15.606,18.335 12.107,18.335z"
|
||||
android:fillColor="#FFFFFF"/>
|
||||
</vector>
|
|
@ -648,8 +648,8 @@
|
|||
<string name="key_show_wizard_button" translatable="false">show_wizard_button</string>
|
||||
<string name="key_show_insulin_button" translatable="false">show_insulin_button</string>
|
||||
<string name="key_show_treatment_button" translatable="false">show_treatment_button</string>
|
||||
<string name="show_calibration_button_summary">Sends a calibration to xDrip+ or open G5 calibration dialog</string>
|
||||
<string name="show_cgm_button_summary">Opens xDrip+, back buttons returns to AAPS</string>
|
||||
<string name="show_calibration_button_summary">Sends a calibration to xDrip+ or open BYODA calibration dialog</string>
|
||||
<string name="show_cgm_button_summary">Opens xDrip+ or BYODA, back buttons returns to AAPS</string>
|
||||
<string name="key_insulin_button_increment_1" translatable="false">insulin_button_increment_1</string>
|
||||
<string name="key_insulin_button_increment_2" translatable="false">insulin_button_increment_2</string>
|
||||
<string name="key_insulin_button_increment_3" translatable="false">insulin_button_increment_3</string>
|
||||
|
|
9
icons/byoda.svg
Normal file
9
icons/byoda.svg
Normal file
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="24px"
|
||||
height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
|
||||
<g id="BYODA">
|
||||
<path fill="#FFFFFF" d="M12.107,3.666c-4.603,0-8.335,3.732-8.335,8.335s3.732,8.335,8.335,8.335s8.335-3.731,8.335-8.335V3.666
|
||||
H12.107z M12.107,18.335c-3.498,0-6.334-2.836-6.334-6.334c0-3.498,2.836-6.334,6.334-6.334c3.498,0,6.334,2.836,6.334,6.334
|
||||
C18.442,15.499,15.606,18.335,12.107,18.335z"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 582 B |
Loading…
Reference in a new issue