Add byoda icon for CGM button

This commit is contained in:
Philoul 2021-12-06 23:06:27 +01:00
parent 3875957801
commit 7fc215db90
3 changed files with 22 additions and 0 deletions

View file

@ -557,6 +557,10 @@ 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 (dexcomPlugin.isEnabled())
binding.buttonsLayout.cgmButton.setCompoundDrawables(rh.gd(R.drawable.ic_xdrip), null, null, null)
else if (xdripPlugin.isEnabled())
binding.buttonsLayout.cgmButton.setCompoundDrawables(rh.gd(R.drawable.ic_byoda), null, null, null)
binding.buttonsLayout.cgmButton.visibility = (sp.getBoolean(R.string.key_show_cgm_button, false) && (xDripIsBgSource || dexcomIsSource)).toVisibility()
// Automation buttons

View 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>

9
icons/byoda.svg Normal file
View 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