Merge pull request #1514 from osodebailar/features/gac_for_treatments_profilehelper_localprofile

Theme switcher preparation: gac for treatments, profilehelper and loc…
This commit is contained in:
Milos Kozak 2022-03-28 21:47:12 +02:00 committed by GitHub
commit 1e0d1edfb5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 64 additions and 44 deletions

View file

@ -286,7 +286,7 @@ class ProfileHelperActivity : NoSplashAppCompatActivity() {
tabSelected = tab tabSelected = tab
typeSelected[tabSelected] = newContent typeSelected[tabSelected] = newContent
binding.profileTypeTitle.defaultHintTextColor = ColorStateList.valueOf(rh.gc(if (tab == 0) R.color.helperProfile else R.color.examinedProfile)) binding.profileTypeTitle.defaultHintTextColor = ColorStateList.valueOf(rh.gac( this, if (tab == 0) R.attr.helperProfileColor else R.attr.examinedProfileColor))
// show new content // show new content
binding.profileType.setText( binding.profileType.setText(
@ -317,7 +317,7 @@ class ProfileHelperActivity : NoSplashAppCompatActivity() {
} }
private fun setBackgroundColorOnSelected(tab: Int) { private fun setBackgroundColorOnSelected(tab: Int) {
binding.menu1.setBackgroundColor(rh.gc(if (tab == 1) R.color.defaultbackground else R.color.helperProfile)) binding.menu1.setBackgroundColor(rh.gac(this, if (tab == 1) R.attr.defaultbackground else R.attr.helperProfileColor))
binding.menu2.setBackgroundColor(rh.gc(if (tab == 0) R.color.defaultbackground else R.color.examinedProfile)) binding.menu2.setBackgroundColor(rh.gac(this, if (tab == 0) R.attr.defaultbackground else R.attr.examinedProfileColor))
} }
} }

View file

@ -87,14 +87,14 @@ class TreatmentsActivity : NoSplashAppCompatActivity() {
} }
private fun setBackgroundColorOnSelected(selected: View) { private fun setBackgroundColorOnSelected(selected: View) {
binding.treatments.setBackgroundColor(rh.gc(R.color.defaultbackground)) binding.treatments.setBackgroundColor(rh.gac(this, R.attr.defaultbackground))
binding.extendedBoluses.setBackgroundColor(rh.gc(R.color.defaultbackground)) binding.extendedBoluses.setBackgroundColor(rh.gac(this, R.attr.defaultbackground))
binding.tempBasals.setBackgroundColor(rh.gc(R.color.defaultbackground)) binding.tempBasals.setBackgroundColor(rh.gac(this, R.attr.defaultbackground))
binding.tempTargets.setBackgroundColor(rh.gc(R.color.defaultbackground)) binding.tempTargets.setBackgroundColor(rh.gac(this, R.attr.defaultbackground))
binding.profileSwitches.setBackgroundColor(rh.gc(R.color.defaultbackground)) binding.profileSwitches.setBackgroundColor(rh.gac(this, R.attr.defaultbackground))
binding.careportal.setBackgroundColor(rh.gc(R.color.defaultbackground)) binding.careportal.setBackgroundColor(rh.gac(this, R.attr.defaultbackground))
binding.userentry.setBackgroundColor(rh.gc(R.color.defaultbackground)) binding.userentry.setBackgroundColor(rh.gac(this, R.attr.defaultbackground))
selected.setBackgroundColor(rh.gc(R.color.tabBgColorSelected)) selected.setBackgroundColor(rh.gac(this, R.attr.tabBgColorSelected))
} }
} }

View file

@ -225,7 +225,7 @@ class TreatmentsBolusCarbsFragment : DaggerFragment() {
holder.binding.bolusInvalid.visibility = bolus.isValid.not().toVisibility() holder.binding.bolusInvalid.visibility = bolus.isValid.not().toVisibility()
val iob = bolus.iobCalc(activePlugin, System.currentTimeMillis(), profile.dia) val iob = bolus.iobCalc(activePlugin, System.currentTimeMillis(), profile.dia)
if (iob.iobContrib > 0.01) { if (iob.iobContrib > 0.01) {
holder.binding.iob.setTextColor(rh.gc(R.color.colorActive)) holder.binding.iob.setTextColor(rh.gac(context , R.attr.activeColor))
holder.binding.iob.text = rh.gs(R.string.formatinsulinunits, iob.iobContrib) holder.binding.iob.text = rh.gs(R.string.formatinsulinunits, iob.iobContrib)
holder.binding.iobLabel.visibility = View.VISIBLE holder.binding.iobLabel.visibility = View.VISIBLE
holder.binding.iob.visibility = View.VISIBLE holder.binding.iob.visibility = View.VISIBLE
@ -235,7 +235,8 @@ class TreatmentsBolusCarbsFragment : DaggerFragment() {
holder.binding.iobLabel.visibility = View.GONE holder.binding.iobLabel.visibility = View.GONE
holder.binding.iob.visibility = View.GONE holder.binding.iob.visibility = View.GONE
} }
if (bolus.timestamp > dateUtil.now()) holder.binding.date.setTextColor(rh.gc(R.color.colorScheduled)) else holder.binding.date.setTextColor(holder.binding.carbs.currentTextColor) if (bolus.timestamp > dateUtil.now()) holder.binding.date.setTextColor(rh.gac(context, R.attr.scheduledColor)) else holder.binding.date.setTextColor(holder.binding.carbs
.currentTextColor)
holder.binding.mealOrCorrection.text = holder.binding.mealOrCorrection.text =
when (ml.bolus.type) { when (ml.bolus.type) {
Bolus.Type.SMB -> "SMB" Bolus.Type.SMB -> "SMB"

View file

@ -135,7 +135,7 @@ class TreatmentsExtendedBolusesFragment : DaggerFragment() {
holder.binding.date.text = if (newDay) dateUtil.dateStringRelative(extendedBolus.timestamp, rh) else "" holder.binding.date.text = if (newDay) dateUtil.dateStringRelative(extendedBolus.timestamp, rh) else ""
if (extendedBolus.isInProgress(dateUtil)) { if (extendedBolus.isInProgress(dateUtil)) {
holder.binding.time.text = dateUtil.timeString(extendedBolus.timestamp) holder.binding.time.text = dateUtil.timeString(extendedBolus.timestamp)
holder.binding.time.setTextColor(rh.gc(R.color.colorActive)) holder.binding.time.setTextColor(rh.gac(context , R.attr.activeColor))
} else { } else {
holder.binding.time.text = dateUtil.timeRangeString(extendedBolus.timestamp, extendedBolus.end) holder.binding.time.text = dateUtil.timeRangeString(extendedBolus.timestamp, extendedBolus.end)
holder.binding.time.setTextColor(holder.binding.insulin.currentTextColor) holder.binding.time.setTextColor(holder.binding.insulin.currentTextColor)
@ -146,7 +146,7 @@ class TreatmentsExtendedBolusesFragment : DaggerFragment() {
val iob = extendedBolus.iobCalc(System.currentTimeMillis(), profile, activePlugin.activeInsulin) val iob = extendedBolus.iobCalc(System.currentTimeMillis(), profile, activePlugin.activeInsulin)
holder.binding.iob.text = rh.gs(R.string.formatinsulinunits, iob.iob) holder.binding.iob.text = rh.gs(R.string.formatinsulinunits, iob.iob)
holder.binding.ratio.text = rh.gs(R.string.pump_basebasalrate, extendedBolus.rate) holder.binding.ratio.text = rh.gs(R.string.pump_basebasalrate, extendedBolus.rate)
if (iob.iob != 0.0) holder.binding.iob.setTextColor(rh.gc(R.color.colorActive)) else holder.binding.iob.setTextColor(holder.binding.insulin.currentTextColor) if (iob.iob != 0.0) holder.binding.iob.setTextColor(rh.gac(context , R.attr.activeColor)) else holder.binding.iob.setTextColor(holder.binding.insulin.currentTextColor)
holder.binding.cbRemove.visibility = (extendedBolus.isValid && removeActionMode != null).toVisibility() holder.binding.cbRemove.visibility = (extendedBolus.isValid && removeActionMode != null).toVisibility()
if (removeActionMode != null) { if (removeActionMode != null) {
holder.binding.cbRemove.setOnCheckedChangeListener { _, value -> holder.binding.cbRemove.setOnCheckedChangeListener { _, value ->

View file

@ -191,7 +191,7 @@ class TreatmentsProfileSwitchFragment : DaggerFragment() {
holder.binding.duration.text = rh.gs(R.string.format_mins, T.msecs(profileSwitch.duration ?: 0L).mins()) holder.binding.duration.text = rh.gs(R.string.format_mins, T.msecs(profileSwitch.duration ?: 0L).mins())
holder.binding.name.text = holder.binding.name.text =
if (profileSwitch is ProfileSealed.PS) profileSwitch.value.getCustomizedName() else if (profileSwitch is ProfileSealed.EPS) profileSwitch.value.originalCustomizedName else "" if (profileSwitch is ProfileSealed.PS) profileSwitch.value.getCustomizedName() else if (profileSwitch is ProfileSealed.EPS) profileSwitch.value.originalCustomizedName else ""
if (profileSwitch.isInProgress(dateUtil)) holder.binding.date.setTextColor(rh.gc(R.color.colorActive)) if (profileSwitch.isInProgress(dateUtil)) holder.binding.date.setTextColor(rh.gac(context , R.attr.activeColor))
else holder.binding.date.setTextColor(holder.binding.duration.currentTextColor) else holder.binding.date.setTextColor(holder.binding.duration.currentTextColor)
holder.binding.clone.tag = profileSwitch holder.binding.clone.tag = profileSwitch
holder.binding.name.tag = profileSwitch holder.binding.name.tag = profileSwitch

View file

@ -195,8 +195,8 @@ class TreatmentsTempTargetFragment : DaggerFragment() {
holder.binding.reason.text = translator.translate(tempTarget.reason) holder.binding.reason.text = translator.translate(tempTarget.reason)
holder.binding.time.setTextColor( holder.binding.time.setTextColor(
when { when {
tempTarget.id == currentlyActiveTarget?.id -> rh.gc(R.color.colorActive) tempTarget.id == currentlyActiveTarget?.id -> rh.gac(context , R.attr.activeColor)
tempTarget.timestamp > dateUtil.now() -> rh.gc(R.color.colorScheduled) tempTarget.timestamp > dateUtil.now() -> rh.gac(context , R.attr.scheduledColor)
else -> holder.binding.reasonColon.currentTextColor else -> holder.binding.reasonColon.currentTextColor
} }
) )

View file

@ -176,7 +176,7 @@ class TreatmentsTemporaryBasalsFragment : DaggerFragment() {
holder.binding.date.text = if (newDay) dateUtil.dateStringRelative(tempBasal.timestamp, rh) else "" holder.binding.date.text = if (newDay) dateUtil.dateStringRelative(tempBasal.timestamp, rh) else ""
if (tempBasal.isInProgress) { if (tempBasal.isInProgress) {
holder.binding.time.text = dateUtil.timeString(tempBasal.timestamp) holder.binding.time.text = dateUtil.timeString(tempBasal.timestamp)
holder.binding.time.setTextColor(rh.gc(R.color.colorActive)) holder.binding.time.setTextColor(rh.gac(context , R.attr.activeColor))
} else { } else {
holder.binding.time.text = dateUtil.timeRangeString(tempBasal.timestamp, tempBasal.end) holder.binding.time.text = dateUtil.timeRangeString(tempBasal.timestamp, tempBasal.end)
holder.binding.time.setTextColor(holder.binding.duration.currentTextColor) holder.binding.time.setTextColor(holder.binding.duration.currentTextColor)
@ -193,7 +193,7 @@ class TreatmentsTemporaryBasalsFragment : DaggerFragment() {
holder.binding.suspendFlag.visibility = (tempBasal.type == TemporaryBasal.Type.PUMP_SUSPEND).toVisibility() holder.binding.suspendFlag.visibility = (tempBasal.type == TemporaryBasal.Type.PUMP_SUSPEND).toVisibility()
holder.binding.emulatedSuspendFlag.visibility = (tempBasal.type == TemporaryBasal.Type.EMULATED_PUMP_SUSPEND).toVisibility() holder.binding.emulatedSuspendFlag.visibility = (tempBasal.type == TemporaryBasal.Type.EMULATED_PUMP_SUSPEND).toVisibility()
holder.binding.superBolusFlag.visibility = (tempBasal.type == TemporaryBasal.Type.SUPERBOLUS).toVisibility() holder.binding.superBolusFlag.visibility = (tempBasal.type == TemporaryBasal.Type.SUPERBOLUS).toVisibility()
if (abs(iob.basaliob) > 0.01) holder.binding.iob.setTextColor(rh.gc(R.color.colorActive)) else holder.binding.iob.setTextColor(holder.binding.duration.currentTextColor) if (abs(iob.basaliob) > 0.01) holder.binding.iob.setTextColor(rh.gac(context , R.attr.activeColor)) else holder.binding.iob.setTextColor(holder.binding.duration.currentTextColor)
holder.binding.cbRemove.visibility = (tempBasal.isValid && removeActionMode != null).toVisibility() holder.binding.cbRemove.visibility = (tempBasal.isValid && removeActionMode != null).toVisibility()
if (removeActionMode != null) { if (removeActionMode != null) {
holder.binding.cbRemove.setOnCheckedChangeListener { _, value -> holder.binding.cbRemove.setOnCheckedChangeListener { _, value ->

View file

@ -374,7 +374,7 @@ class LocalProfileFragment : DaggerFragment() {
val isValid = localProfilePlugin.isValidEditState(activity) val isValid = localProfilePlugin.isValidEditState(activity)
val isEdited = localProfilePlugin.isEdited val isEdited = localProfilePlugin.isEdited
if (isValid) { if (isValid) {
this.view?.setBackgroundColor(rh.gc(R.color.ok_background)) this.view?.setBackgroundColor(rh.gac(context, R.attr.okBackgroundColor))
binding.profileList.isEnabled = true binding.profileList.isEnabled = true
if (isEdited) { if (isEdited) {
@ -386,7 +386,7 @@ class LocalProfileFragment : DaggerFragment() {
binding.save.visibility = View.GONE binding.save.visibility = View.GONE
} }
} else { } else {
this.view?.setBackgroundColor(rh.gc(R.color.error_background)) this.view?.setBackgroundColor(rh.gac(context, R.attr.errorBackgroundColor))
binding.profileList.isEnabled = false binding.profileList.isEnabled = false
binding.profileswitch.visibility = View.GONE binding.profileswitch.visibility = View.GONE
binding.save.visibility = View.GONE //don't save an invalid profile binding.save.visibility = View.GONE //don't save an invalid profile
@ -401,12 +401,12 @@ class LocalProfileFragment : DaggerFragment() {
} }
private fun processVisibilityOnClick(selected: View) { private fun processVisibilityOnClick(selected: View) {
binding.diaTab.setBackgroundColor(rh.gc(R.color.defaultbackground)) binding.diaTab.setBackgroundColor(rh.gac(context, R.attr.defaultbackground))
binding.icTab.setBackgroundColor(rh.gc(R.color.defaultbackground)) binding.icTab.setBackgroundColor(rh.gac(context, R.attr.defaultbackground))
binding.isfTab.setBackgroundColor(rh.gc(R.color.defaultbackground)) binding.isfTab.setBackgroundColor(rh.gac(context, R.attr.defaultbackground))
binding.basalTab.setBackgroundColor(rh.gc(R.color.defaultbackground)) binding.basalTab.setBackgroundColor(rh.gac(context, R.attr.defaultbackground))
binding.targetTab.setBackgroundColor(rh.gc(R.color.defaultbackground)) binding.targetTab.setBackgroundColor(rh.gac(context, R.attr.defaultbackground))
selected.setBackgroundColor(rh.gc(R.color.tabBgColorSelected)) selected.setBackgroundColor(rh.gac(context, R.attr.tabBgColorSelected))
binding.diaPlaceholder.visibility = View.GONE binding.diaPlaceholder.visibility = View.GONE
binding.ic.visibility = View.GONE binding.ic.visibility = View.GONE
binding.isf.visibility = View.GONE binding.isf.visibility = View.GONE

View file

@ -5,5 +5,5 @@
android:viewportHeight="24"> android:viewportHeight="24">
<path <path
android:pathData="M19.744,9.7c-0.135,-0.417 -0.494,-0.72 -0.928,-0.783l-3.997,-0.581L13.03,4.714c-0.387,-0.786 -1.675,-0.786 -2.061,0L9.181,8.336L5.183,8.918C4.751,8.98 4.39,9.284 4.255,9.7c-0.135,0.416 -0.023,0.873 0.291,1.178l2.894,2.819L6.757,17.68c-0.074,0.432 0.103,0.868 0.457,1.125c0.2,0.146 0.437,0.22 0.676,0.22c0.183,0 0.367,-0.044 0.535,-0.133L12,17.013l3.576,1.879c0.39,0.203 0.855,0.173 1.212,-0.087c0.353,-0.257 0.531,-0.694 0.456,-1.125l-0.683,-3.983l2.893,-2.819C19.766,10.573 19.881,10.116 19.744,9.7zM18.689,10.261l-3.16,3.081l0.746,4.35c0.014,0.087 -0.021,0.174 -0.092,0.225c-0.04,0.03 -0.087,0.044 -0.135,0.044c-0.036,0 -0.073,-0.008 -0.108,-0.027l-3.907,-2.053l-3.907,2.053c-0.075,0.044 -0.17,0.036 -0.242,-0.017c-0.07,-0.051 -0.106,-0.138 -0.091,-0.225l0.746,-4.35l-3.162,-3.081c-0.063,-0.061 -0.085,-0.153 -0.058,-0.236c0.027,-0.083 0.099,-0.143 0.185,-0.156l4.369,-0.634l1.954,-3.959c0.078,-0.158 0.334,-0.158 0.412,0l1.953,3.959l4.369,0.634c0.087,0.013 0.158,0.073 0.185,0.156S18.753,10.2 18.689,10.261z" android:pathData="M19.744,9.7c-0.135,-0.417 -0.494,-0.72 -0.928,-0.783l-3.997,-0.581L13.03,4.714c-0.387,-0.786 -1.675,-0.786 -2.061,0L9.181,8.336L5.183,8.918C4.751,8.98 4.39,9.284 4.255,9.7c-0.135,0.416 -0.023,0.873 0.291,1.178l2.894,2.819L6.757,17.68c-0.074,0.432 0.103,0.868 0.457,1.125c0.2,0.146 0.437,0.22 0.676,0.22c0.183,0 0.367,-0.044 0.535,-0.133L12,17.013l3.576,1.879c0.39,0.203 0.855,0.173 1.212,-0.087c0.353,-0.257 0.531,-0.694 0.456,-1.125l-0.683,-3.983l2.893,-2.819C19.766,10.573 19.881,10.116 19.744,9.7zM18.689,10.261l-3.16,3.081l0.746,4.35c0.014,0.087 -0.021,0.174 -0.092,0.225c-0.04,0.03 -0.087,0.044 -0.135,0.044c-0.036,0 -0.073,-0.008 -0.108,-0.027l-3.907,-2.053l-3.907,2.053c-0.075,0.044 -0.17,0.036 -0.242,-0.017c-0.07,-0.051 -0.106,-0.138 -0.091,-0.225l0.746,-4.35l-3.162,-3.081c-0.063,-0.061 -0.085,-0.153 -0.058,-0.236c0.027,-0.083 0.099,-0.143 0.185,-0.156l4.369,-0.634l1.954,-3.959c0.078,-0.158 0.334,-0.158 0.412,0l1.953,3.959l4.369,0.634c0.087,0.013 0.158,0.073 0.185,0.156S18.753,10.2 18.689,10.261z"
android:fillColor="#FFFFFF"/> android:fillColor="?attr/colorControlNormal"/>
</vector> </vector>

View file

@ -45,7 +45,7 @@
android:layout_weight="0.5" android:layout_weight="0.5"
android:drawableTop="@drawable/icon_insulin_carbs" android:drawableTop="@drawable/icon_insulin_carbs"
android:text="@string/overview_treatment_label" android:text="@string/overview_treatment_label"
android:textColor="?attr/treatmentButtonColor" android:textColor="?attr/treatmentButton"
android:textSize="10sp" android:textSize="10sp"
android:visibility="gone" android:visibility="gone"
tools:ignore="SmallSp" /> tools:ignore="SmallSp" />

View file

@ -5,6 +5,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
card_view:cardElevation="0dp"
card_view:cardBackgroundColor="?attr/cardItemBackgroundColor"> card_view:cardBackgroundColor="?attr/cardItemBackgroundColor">
<LinearLayout <LinearLayout

View file

@ -33,8 +33,6 @@
<item name="actionModeCloseDrawable">@drawable/ic_close</item> <item name="actionModeCloseDrawable">@drawable/ic_close</item>
<!---bolus color --> <!---bolus color -->
<item name="bolusColor">@color/bolus</item> <item name="bolusColor">@color/bolus</item>
<!---Treatment button color -->
<item name="treatmentButton">@color/colorTreatmentButton</item>
<!---Number Picker text color --> <!---Number Picker text color -->
<item name="numPickerText">@color/black</item> <item name="numPickerText">@color/black</item>
<!---NS Client action text color --> <!---NS Client action text color -->
@ -59,12 +57,14 @@
<item name="tempTargetConfirmation">@color/tempTargetConfirmation</item> <item name="tempTargetConfirmation">@color/tempTargetConfirmation</item>
<!-- Treatments --> <!-- Treatments -->
<item name="setExtendedButtonColor">@color/colorSetExtendedButton</item> <item name="setExtendedButtonColor">@color/colorSetExtendedButton</item>
<item name="activeColor">@color/colorActive</item>
<item name="scheduledColor">@color/colorScheduled</item>
<!-- Carbs Button --> <!-- Carbs Button -->
<item name="carbsButtonColor">@color/colorCarbsButton</item> <item name="carbsButtonColor">@color/colorCarbsButton</item>
<!-- Temp Button Button --> <!-- Temp Button Button -->
<item name="acceptTempButtonColor">@color/colorAcceptTempButton</item> <item name="acceptTempButtonColor">@color/colorAcceptTempButton</item>
<!-- Treatment Button --> <!-- Treatment Button -->
<item name="treatmentButtonColor">@color/colorTreatmentButton</item> <item name="treatmentButton">@color/colorTreatmentButton</item>
<!-- Insulin Button --> <!-- Insulin Button -->
<item name="insulinButtonColor">@color/colorInsulinButton</item> <item name="insulinButtonColor">@color/colorInsulinButton</item>
<!-- Calculator Button --> <!-- Calculator Button -->
@ -127,6 +127,12 @@
<item name="bgLow">@color/low</item> <item name="bgLow">@color/low</item>
<item name="bgHigh">@color/high</item> <item name="bgHigh">@color/high</item>
<item name="bgInRange">@color/inrange</item> <item name="bgInRange">@color/inrange</item>
<!---Profile Helper -->
<item name="helperProfileColor">@color/helperProfile</item>
<item name="examinedProfileColor">@color/examinedProfile</item>
<!---Local profile -->
<item name="okBackgroundColor">@color/ok_background</item>
<item name="errorBackgroundColor">@color/error_background</item>
</style> </style>
<style name="Theme.MaterialComponents.DayNight.DarkActionBar" parent="Theme.MaterialComponents.DayNight.Bridge"/> <style name="Theme.MaterialComponents.DayNight.DarkActionBar" parent="Theme.MaterialComponents.DayNight.Bridge"/>

View file

@ -1,8 +1,6 @@
<resources> <resources>
<!---bolus color --> <!---bolus color -->
<attr name="bolusColor" format="reference|color" /> <attr name="bolusColor" format="reference|color" />
<!---Treatment button color -->
<attr name="treatmentButton" format="reference|color" />
<!---Number Picker text color --> <!---Number Picker text color -->
<attr name="numPickerText" format="reference|color" /> <attr name="numPickerText" format="reference|color" />
<!---NS Client action text color --> <!---NS Client action text color -->
@ -31,8 +29,10 @@
<attr name="carbsButtonColor" format="reference|color" /> <attr name="carbsButtonColor" format="reference|color" />
<!-- Temp Button Button --> <!-- Temp Button Button -->
<attr name="acceptTempButtonColor" format="reference|color" /> <attr name="acceptTempButtonColor" format="reference|color" />
<!-- Treatment Button --> <!---Treatment -->
<attr name="treatmentButtonColor" format="reference|color" /> <attr name="treatmentButton" format="reference|color" />
<attr name="activeColor" format="reference|color" />
<attr name="scheduledColor" format="reference|color" />
<!-- Insulin Button --> <!-- Insulin Button -->
<attr name="insulinButtonColor" format="reference|color" /> <attr name="insulinButtonColor" format="reference|color" />
<!-- Calculator Button --> <!-- Calculator Button -->
@ -101,4 +101,10 @@
<attr name="bgLow" format="reference|color" /> <attr name="bgLow" format="reference|color" />
<attr name="bgHigh" format="reference|color" /> <attr name="bgHigh" format="reference|color" />
<attr name="bgInRange" format="reference|color" /> <attr name="bgInRange" format="reference|color" />
<!---Profile Helper -->
<attr name="helperProfileColor" format="reference|color" />
<attr name="examinedProfileColor" format="reference|color" />
<!---Local profile -->
<attr name="okBackgroundColor" format="reference|color" />
<attr name="errorBackgroundColor" format="reference|color" />
</resources> </resources>

View file

@ -8,7 +8,7 @@
<color name="mdtp_white">#ffffff</color> <color name="mdtp_white">#ffffff</color>
<color name="mdtp_line_dark">#808080</color> <color name="mdtp_line_dark">#808080</color>
<color name="colorLightGray">#d8d8d8</color> <color name="colorLightGray">#d8d8d8</color>
<color name="cardColorBackground">#999999</color> <color name="cardColorBackground">@color/lightgray</color>
<color name="black_overlay">#66000000</color> <color name="black_overlay">#66000000</color>
<color name="gray">#BBBBBB</color> <color name="gray">#BBBBBB</color>
<color name="black">#FF000000</color> <color name="black">#FF000000</color>
@ -25,8 +25,8 @@
<color name="overviewPillColorDefault">#1c171c</color> <color name="overviewPillColorDefault">#1c171c</color>
<color name="colorOnPrimaryDefault">#FFFFFF</color> <color name="colorOnPrimaryDefault">#FFFFFF</color>
<color name="defaultbackground">#424242</color> <color name="defaultbackground">#FFFFFF</color>
<color name="defaulttextcolor">#B3FFFFFF</color> <color name="defaulttextcolor">#000000</color>
<!---Android Dark ans Light Theme Base colors--> <!---Android Dark ans Light Theme Base colors-->
<color name="background_dark">#262626</color> <color name="background_dark">#262626</color>
@ -172,7 +172,7 @@
<color name="warning">#ff1a1a</color> <color name="warning">#ff1a1a</color>
<color name="info">#77dd77</color> <color name="info">#77dd77</color>
<color name="error_background">#66FC0000</color> <color name="error_background">#66FC0000</color>
<color name="ok_background">@color/black</color> <color name="ok_background">@color/white</color>
<color name="tempTargetBackground">#77dd77</color> <color name="tempTargetBackground">#77dd77</color>
<color name="exercise">#67DFE8</color> <color name="exercise">#67DFE8</color>

View file

@ -32,8 +32,6 @@
<item name="actionModeCloseDrawable">@drawable/ic_close</item> <item name="actionModeCloseDrawable">@drawable/ic_close</item>
<!---bolus color --> <!---bolus color -->
<item name="bolusColor">@color/bolus</item> <item name="bolusColor">@color/bolus</item>
<!---Treatment button color -->
<item name="treatmentButton">@color/colorTreatmentButton</item>
<!---Number Picker text color --> <!---Number Picker text color -->
<item name="numPickerText">@color/black</item> <item name="numPickerText">@color/black</item>
<!---NS Client action text color --> <!---NS Client action text color -->
@ -58,12 +56,14 @@
<item name="tempTargetConfirmation">@color/tempTargetConfirmation</item> <item name="tempTargetConfirmation">@color/tempTargetConfirmation</item>
<!-- Treatments --> <!-- Treatments -->
<item name="setExtendedButtonColor">@color/colorSetExtendedButton</item> <item name="setExtendedButtonColor">@color/colorSetExtendedButton</item>
<item name="activeColor">@color/colorActive</item>
<item name="scheduledColor">@color/colorScheduled</item>
<!-- Carbs Button --> <!-- Carbs Button -->
<item name="carbsButtonColor">@color/colorCarbsButton</item> <item name="carbsButtonColor">@color/colorCarbsButton</item>
<!-- Temp Button Button --> <!-- Temp Button Button -->
<item name="acceptTempButtonColor">@color/colorAcceptTempButton</item> <item name="acceptTempButtonColor">@color/colorAcceptTempButton</item>
<!-- Treatment Button --> <!-- Treatment Button -->
<item name="treatmentButtonColor">@color/colorTreatmentButton</item> <item name="treatmentButton">@color/colorTreatmentButton</item>
<!-- Insulin Button --> <!-- Insulin Button -->
<item name="insulinButtonColor">@color/colorInsulinButton</item> <item name="insulinButtonColor">@color/colorInsulinButton</item>
<!-- Calculator Button --> <!-- Calculator Button -->
@ -126,6 +126,12 @@
<item name="bgLow">@color/low</item> <item name="bgLow">@color/low</item>
<item name="bgHigh">@color/high</item> <item name="bgHigh">@color/high</item>
<item name="bgInRange">@color/inrange</item> <item name="bgInRange">@color/inrange</item>
<!---Profile Helper -->
<item name="helperProfileColor">@color/helperProfile</item>
<item name="examinedProfileColor">@color/examinedProfile</item>
<!---Local profile -->
<item name="okBackgroundColor">@color/ok_background</item>
<item name="errorBackgroundColor">@color/error_background</item>
</style> </style>
<style name="Theme.MaterialComponents.DayNight.DarkActionBar" parent="Theme.MaterialComponents.DayNight.Bridge"/> <style name="Theme.MaterialComponents.DayNight.DarkActionBar" parent="Theme.MaterialComponents.DayNight.Bridge"/>