Merge pull request #1512 from osodebailar/features/gac_for_overview_and_historybrowser

Theme switcher preparation: gac for overview and historybrowser
This commit is contained in:
Milos Kozak 2022-03-28 13:22:12 +02:00 committed by GitHub
commit 1ad7eb2b85
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 84 additions and 38 deletions

View file

@ -196,7 +196,7 @@ class HistoryBrowseActivity : NoSplashAppCompatActivity() {
axisWidth = if (dm.densityDpi <= 120) 3 else if (dm.densityDpi <= 160) 10 else if (dm.densityDpi <= 320) 35 else if (dm.densityDpi <= 420) 50 else if (dm.densityDpi <= 560) 70 else 80 axisWidth = if (dm.densityDpi <= 120) 3 else if (dm.densityDpi <= 160) 10 else if (dm.densityDpi <= 320) 35 else if (dm.densityDpi <= 420) 50 else if (dm.densityDpi <= 560) 70 else 80
binding.bgGraph.gridLabelRenderer?.gridColor = rh.gc(R.color.graphgrid) binding.bgGraph.gridLabelRenderer?.gridColor = rh.gac(this, R.attr.graphgrid)
binding.bgGraph.gridLabelRenderer?.reloadStyles() binding.bgGraph.gridLabelRenderer?.reloadStyles()
binding.bgGraph.gridLabelRenderer?.labelVerticalWidth = axisWidth binding.bgGraph.gridLabelRenderer?.labelVerticalWidth = axisWidth
@ -280,12 +280,12 @@ class HistoryBrowseActivity : NoSplashAppCompatActivity() {
val graph = GraphView(this) val graph = GraphView(this)
graph.layoutParams = LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, rh.dpToPx(100)).also { it.setMargins(0, rh.dpToPx(15), 0, rh.dpToPx(10)) } graph.layoutParams = LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, rh.dpToPx(100)).also { it.setMargins(0, rh.dpToPx(15), 0, rh.dpToPx(10)) }
graph.gridLabelRenderer?.gridColor = rh.gc(R.color.graphgrid) graph.gridLabelRenderer?.gridColor = rh.gac( R.attr.graphgrid)
graph.gridLabelRenderer?.reloadStyles() graph.gridLabelRenderer?.reloadStyles()
graph.gridLabelRenderer?.isHorizontalLabelsVisible = false graph.gridLabelRenderer?.isHorizontalLabelsVisible = false
graph.gridLabelRenderer?.labelVerticalWidth = axisWidth graph.gridLabelRenderer?.labelVerticalWidth = axisWidth
graph.gridLabelRenderer?.numVerticalLabels = 3 graph.gridLabelRenderer?.numVerticalLabels = 3
graph.viewport.backgroundColor = Color.argb(20, 255, 255, 255) // 8% of gray graph.viewport.backgroundColor =rh.gac(this , R.attr.viewPortbackgroundColor)
relativeLayout.addView(graph) relativeLayout.addView(graph)
val label = TextView(this) val label = TextView(this)

View file

@ -1,5 +1,6 @@
package info.nightscout.androidaps.plugins.general.overview package info.nightscout.androidaps.plugins.general.overview
import android.content.Context
import android.graphics.DashPathEffect import android.graphics.DashPathEffect
import android.graphics.Paint import android.graphics.Paint
import com.jjoe64.graphview.series.BarGraphSeries import com.jjoe64.graphview.series.BarGraphSeries
@ -138,11 +139,12 @@ class OverviewData @Inject constructor(
lastBg.valueToUnits(profileFunction.getUnits()) > defaultValueHelper.determineHighLine() lastBg.valueToUnits(profileFunction.getUnits()) > defaultValueHelper.determineHighLine()
} ?: false } ?: false
val lastBgColor: Int fun lastBgColor(context: Context?): Int {
get() = when { return when {
isLow -> rh.gc(R.color.low) isLow -> rh.gac(context, R.attr.bgLow)
isHigh -> rh.gc(R.color.high) isHigh -> rh.gac(context, R.attr.bgHigh)
else -> rh.gc(R.color.inrange) else -> rh.gac(context, R.attr.bgInRange)
}
} }
val lastBgDescription: String val lastBgDescription: String

View file

@ -173,7 +173,7 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList
binding.notifications.setHasFixedSize(false) binding.notifications.setHasFixedSize(false)
binding.notifications.layoutManager = LinearLayoutManager(view.context) binding.notifications.layoutManager = LinearLayoutManager(view.context)
axisWidth = if (dm.densityDpi <= 120) 3 else if (dm.densityDpi <= 160) 10 else if (dm.densityDpi <= 320) 35 else if (dm.densityDpi <= 420) 50 else if (dm.densityDpi <= 560) 70 else 80 axisWidth = if (dm.densityDpi <= 120) 3 else if (dm.densityDpi <= 160) 10 else if (dm.densityDpi <= 320) 35 else if (dm.densityDpi <= 420) 50 else if (dm.densityDpi <= 560) 70 else 80
binding.graphsLayout.bgGraph.gridLabelRenderer?.gridColor = rh.gc(R.color.graphgrid) binding.graphsLayout.bgGraph.gridLabelRenderer?.gridColor = rh.gac(context , R.attr.graphgrid)
binding.graphsLayout.bgGraph.gridLabelRenderer?.reloadStyles() binding.graphsLayout.bgGraph.gridLabelRenderer?.reloadStyles()
binding.graphsLayout.bgGraph.gridLabelRenderer?.labelVerticalWidth = axisWidth binding.graphsLayout.bgGraph.gridLabelRenderer?.labelVerticalWidth = axisWidth
binding.graphsLayout.bgGraph.layoutParams?.height = rh.dpToPx(skinProvider.activeSkin().mainGraphHeight) binding.graphsLayout.bgGraph.layoutParams?.height = rh.dpToPx(skinProvider.activeSkin().mainGraphHeight)
@ -559,10 +559,10 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList
binding.buttonsLayout.calibrationButton.visibility = (xDripIsBgSource && actualBG != null && sp.getBoolean(R.string.key_show_calibration_button, true)).toVisibility() binding.buttonsLayout.calibrationButton.visibility = (xDripIsBgSource && actualBG != null && sp.getBoolean(R.string.key_show_calibration_button, true)).toVisibility()
if (dexcomIsSource) { if (dexcomIsSource) {
binding.buttonsLayout.cgmButton.setCompoundDrawablesWithIntrinsicBounds(null, rh.gd(R.drawable.ic_byoda), null, null) binding.buttonsLayout.cgmButton.setCompoundDrawablesWithIntrinsicBounds(null, rh.gd(R.drawable.ic_byoda), null, null)
binding.buttonsLayout.cgmButton.setTextColor(rh.gc(R.color.colorLightGray)) binding.buttonsLayout.cgmButton.setTextColor(rh.gac(context, R.attr.cgmdexColor))
} else if (xDripIsBgSource) { } else if (xDripIsBgSource) {
binding.buttonsLayout.cgmButton.setCompoundDrawablesWithIntrinsicBounds(null, rh.gd(R.drawable.ic_xdrip), null, null) 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.setTextColor(rh.gac(context, R.attr.cgmxdripColor))
} }
binding.buttonsLayout.cgmButton.visibility = (sp.getBoolean(R.string.key_show_cgm_button, false) && (xDripIsBgSource || dexcomIsSource)).toVisibility() binding.buttonsLayout.cgmButton.visibility = (sp.getBoolean(R.string.key_show_cgm_button, false) && (xDripIsBgSource || dexcomIsSource)).toVisibility()
@ -574,7 +574,7 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList
if (event.isEnabled && event.trigger.shouldRun()) if (event.isEnabled && event.trigger.shouldRun())
context?.let { context -> context?.let { context ->
SingleClickButton(context).also { SingleClickButton(context).also {
it.setTextColor(rh.gc(R.color.colorTreatmentButton)) it.setTextColor(rh.gac(context, R.attr.treatmentButton))
it.setTextSize(TypedValue.COMPLEX_UNIT_SP, 10f) it.setTextSize(TypedValue.COMPLEX_UNIT_SP, 10f)
it.layoutParams = LinearLayout.LayoutParams(0, ViewGroup.LayoutParams.MATCH_PARENT, 0.5f).also { l -> it.layoutParams = LinearLayout.LayoutParams(0, ViewGroup.LayoutParams.MATCH_PARENT, 0.5f).also { l ->
l.setMargins(0, 0, rh.dpToPx(-4), 0) l.setMargins(0, 0, rh.dpToPx(-4), 0)
@ -722,12 +722,12 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList
val graph = GraphView(context) val graph = GraphView(context)
graph.layoutParams = graph.layoutParams =
LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, rh.dpToPx(skinProvider.activeSkin().secondaryGraphHeight)).also { it.setMargins(0, rh.dpToPx(15), 0, rh.dpToPx(10)) } LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, rh.dpToPx(skinProvider.activeSkin().secondaryGraphHeight)).also { it.setMargins(0, rh.dpToPx(15), 0, rh.dpToPx(10)) }
graph.gridLabelRenderer?.gridColor = rh.gc(R.color.graphgrid) graph.gridLabelRenderer?.gridColor = rh.gac(context , R.attr.graphgrid)
graph.gridLabelRenderer?.reloadStyles() graph.gridLabelRenderer?.reloadStyles()
graph.gridLabelRenderer?.isHorizontalLabelsVisible = false graph.gridLabelRenderer?.isHorizontalLabelsVisible = false
graph.gridLabelRenderer?.labelVerticalWidth = axisWidth graph.gridLabelRenderer?.labelVerticalWidth = axisWidth
graph.gridLabelRenderer?.numVerticalLabels = 3 graph.gridLabelRenderer?.numVerticalLabels = 3
graph.viewport.backgroundColor = Color.argb(20, 255, 255, 255) // 8% of gray graph.viewport.backgroundColor = rh.gac(context , R.attr.viewPortbackgroundColor)
relativeLayout.addView(graph) relativeLayout.addView(graph)
val label = TextView(context) val label = TextView(context)
@ -765,15 +765,15 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList
val units = profileFunction.getUnits() val units = profileFunction.getUnits()
binding.infoLayout.bg.text = overviewData.lastBg?.valueToUnitsString(units) binding.infoLayout.bg.text = overviewData.lastBg?.valueToUnitsString(units)
?: rh.gs(R.string.notavailable) ?: rh.gs(R.string.notavailable)
binding.infoLayout.bg.setTextColor(overviewData.lastBgColor) binding.infoLayout.bg.setTextColor(overviewData.lastBgColor(context))
binding.infoLayout.arrow.setImageResource(trendCalculator.getTrendArrow(overviewData.lastBg).directionToIcon()) binding.infoLayout.arrow.setImageResource(trendCalculator.getTrendArrow(overviewData.lastBg).directionToIcon())
binding.infoLayout.arrow.setColorFilter(overviewData.lastBgColor) binding.infoLayout.arrow.setColorFilter(overviewData.lastBgColor(context))
binding.infoLayout.arrow.contentDescription = overviewData.lastBgDescription + " " + rh.gs(R.string.and) + " " + trendCalculator.getTrendDescription(overviewData.lastBg) binding.infoLayout.arrow.contentDescription = overviewData.lastBgDescription + " " + rh.gs(R.string.and) + " " + trendCalculator.getTrendDescription(overviewData.lastBg)
val glucoseStatus = glucoseStatusProvider.glucoseStatusData val glucoseStatus = glucoseStatusProvider.glucoseStatusData
if (glucoseStatus != null) { if (glucoseStatus != null) {
binding.infoLayout.deltaLarge.text = Profile.toSignedUnitsString(glucoseStatus.delta, glucoseStatus.delta * Constants.MGDL_TO_MMOLL, units) binding.infoLayout.deltaLarge.text = Profile.toSignedUnitsString(glucoseStatus.delta, glucoseStatus.delta * Constants.MGDL_TO_MMOLL, units)
binding.infoLayout.deltaLarge.setTextColor(overviewData.lastBgColor) binding.infoLayout.deltaLarge.setTextColor(overviewData.lastBgColor(context))
binding.infoLayout.delta.text = Profile.toSignedUnitsString(glucoseStatus.delta, glucoseStatus.delta * Constants.MGDL_TO_MMOLL, units) binding.infoLayout.delta.text = Profile.toSignedUnitsString(glucoseStatus.delta, glucoseStatus.delta * Constants.MGDL_TO_MMOLL, units)
binding.infoLayout.avgDelta.text = Profile.toSignedUnitsString(glucoseStatus.shortAvgDelta, glucoseStatus.shortAvgDelta * Constants.MGDL_TO_MMOLL, units) binding.infoLayout.avgDelta.text = Profile.toSignedUnitsString(glucoseStatus.shortAvgDelta, glucoseStatus.shortAvgDelta * Constants.MGDL_TO_MMOLL, units)
binding.infoLayout.longAvgDelta.text = Profile.toSignedUnitsString(glucoseStatus.longAvgDelta, glucoseStatus.longAvgDelta * Constants.MGDL_TO_MMOLL, units) binding.infoLayout.longAvgDelta.text = Profile.toSignedUnitsString(glucoseStatus.longAvgDelta, glucoseStatus.longAvgDelta * Constants.MGDL_TO_MMOLL, units)
@ -816,27 +816,27 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList
profileFunction.getProfile()?.let { profileFunction.getProfile()?.let {
if (it is ProfileSealed.EPS) { if (it is ProfileSealed.EPS) {
if (it.value.originalPercentage != 100 || it.value.originalTimeshift != 0L || it.value.originalDuration != 0L) if (it.value.originalPercentage != 100 || it.value.originalTimeshift != 0L || it.value.originalDuration != 0L)
rh.gc(R.color.ribbonWarning) rh.gac(context, R.attr.ribbonWarningColor)
else rh.gc(R.color.ribbonDefault) else rh.gac(context, R.attr.ribbonDefaultColor)
} else if (it is ProfileSealed.PS) { } else if (it is ProfileSealed.PS) {
rh.gc(R.color.ribbonDefault) rh.gac(context, R.attr.ribbonDefaultColor)
} else { } else {
rh.gc(R.color.ribbonDefault) rh.gac(context, R.attr.ribbonDefaultColor)
} }
} ?: rh.gc(R.color.ribbonCritical) } ?: rh.gac(context, R.attr.ribbonCriticalColor)
val profileTextColor = val profileTextColor =
profileFunction.getProfile()?.let { profileFunction.getProfile()?.let {
if (it is ProfileSealed.EPS) { if (it is ProfileSealed.EPS) {
if (it.value.originalPercentage != 100 || it.value.originalTimeshift != 0L || it.value.originalDuration != 0L) if (it.value.originalPercentage != 100 || it.value.originalTimeshift != 0L || it.value.originalDuration != 0L)
rh.gc(R.color.ribbonTextWarning) rh.gac(context, R.attr.ribbonTextWarningColor)
else rh.gc(R.color.ribbonTextDefault) else rh.gac(context, R.attr.ribbonTextDefaultColor)
} else if (it is ProfileSealed.PS) { } else if (it is ProfileSealed.PS) {
rh.gc(R.color.ribbonTextDefault) rh.gac(context, R.attr.ribbonTextDefaultColor)
} else { } else {
rh.gc(R.color.ribbonTextDefault) rh.gac(context, R.attr.ribbonTextDefaultColor)
} }
} ?: rh.gc(R.color.ribbonTextDefault) } ?: rh.gac(context, R.attr.ribbonTextDefaultColor)
binding.activeProfile.text = profileFunction.getProfileNameWithRemainingTime() binding.activeProfile.text = profileFunction.getProfileNameWithRemainingTime()
binding.activeProfile.setBackgroundColor(profileBackgroundColor) binding.activeProfile.setBackgroundColor(profileBackgroundColor)
@ -929,8 +929,8 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList
if (overviewData.temporaryTarget?.isInProgress(dateUtil) == false) overviewData.temporaryTarget = null if (overviewData.temporaryTarget?.isInProgress(dateUtil) == false) overviewData.temporaryTarget = null
val tempTarget = overviewData.temporaryTarget val tempTarget = overviewData.temporaryTarget
if (tempTarget != null) { if (tempTarget != null) {
binding.tempTarget.setTextColor(rh.gc(R.color.ribbonTextWarning)) binding.tempTarget.setTextColor(rh.gac(context, R.attr.ribbonTextWarningColor))
binding.tempTarget.setBackgroundColor(rh.gc(R.color.ribbonWarning)) binding.tempTarget.setBackgroundColor(rh.gac(context, R.attr.ribbonWarningColor))
binding.tempTarget.text = Profile.toTargetRangeString(tempTarget.lowTarget, tempTarget.highTarget, GlucoseUnit.MGDL, units) + " " + dateUtil.untilString(tempTarget.end, rh) binding.tempTarget.text = Profile.toTargetRangeString(tempTarget.lowTarget, tempTarget.highTarget, GlucoseUnit.MGDL, units) + " " + dateUtil.untilString(tempTarget.end, rh)
} else { } else {
// If the target is not the same as set in the profile then oref has overridden it // If the target is not the same as set in the profile then oref has overridden it
@ -940,11 +940,11 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList
if (targetUsed != 0.0 && abs(profile.getTargetMgdl() - targetUsed) > 0.01) { if (targetUsed != 0.0 && abs(profile.getTargetMgdl() - targetUsed) > 0.01) {
aapsLogger.debug("Adjusted target. Profile: ${profile.getTargetMgdl()} APS: $targetUsed") aapsLogger.debug("Adjusted target. Profile: ${profile.getTargetMgdl()} APS: $targetUsed")
binding.tempTarget.text = Profile.toTargetRangeString(targetUsed, targetUsed, GlucoseUnit.MGDL, units) binding.tempTarget.text = Profile.toTargetRangeString(targetUsed, targetUsed, GlucoseUnit.MGDL, units)
binding.tempTarget.setTextColor(rh.gc(R.color.ribbonTextWarning)) binding.tempTarget.setTextColor(rh.gac(context, R.attr.ribbonTextWarningColor))
binding.tempTarget.setBackgroundColor(rh.gc(R.color.tempTargetBackground)) binding.tempTarget.setBackgroundColor(rh.gac(context, R.attr.tempTargetBackgroundColor))
} else { } else {
binding.tempTarget.setTextColor(rh.gc(R.color.ribbonTextDefault)) binding.tempTarget.setTextColor(rh.gac(context, R.attr.ribbonTextDefaultColor))
binding.tempTarget.setBackgroundColor(rh.gc(R.color.ribbonDefault)) binding.tempTarget.setBackgroundColor(rh.gac(context, R.attr.ribbonDefaultColor))
binding.tempTarget.text = Profile.toTargetRangeString(profile.getTargetLowMgdl(), profile.getTargetHighMgdl(), GlucoseUnit.MGDL, units) binding.tempTarget.text = Profile.toTargetRangeString(profile.getTargetLowMgdl(), profile.getTargetHighMgdl(), GlucoseUnit.MGDL, units)
} }
} }

View file

@ -32,5 +32,5 @@ interface ResourceHelper {
/** /**
* Get Attribute Color based on theme style for specified context * Get Attribute Color based on theme style for specified context
*/ */
@ColorInt fun gac(context: Context, @AttrRes attributeId: Int): Int @ColorInt fun gac(context: Context?, @AttrRes attributeId: Int): Int
} }

View file

@ -85,8 +85,8 @@ class ResourceHelperImplementation @Inject constructor(private val context: Cont
override fun shortTextMode(): Boolean = !gb(R.bool.isTablet) override fun shortTextMode(): Boolean = !gb(R.bool.isTablet)
override fun gac(context: Context, attributeId: Int): Int = override fun gac(context: Context?, attributeId: Int): Int =
context.getThemeColor(attributeId) (context ?: ContextThemeWrapper(this.context, R.style.AppTheme)).getThemeColor(attributeId)
override fun gac(attributeId: Int): Int = override fun gac(attributeId: Int): Int =
ContextThemeWrapper(this.context, R.style.AppTheme).getThemeColor(attributeId) ContextThemeWrapper(this.context, R.style.AppTheme).getThemeColor(attributeId)

View file

@ -92,6 +92,10 @@
<item name="activity_title_backgroundColor">@color/activity_title_background</item> <item name="activity_title_backgroundColor">@color/activity_title_background</item>
<!---Automation --> <!---Automation -->
<item name="ribbonDefaultColor">@color/ribbonDefault</item> <item name="ribbonDefaultColor">@color/ribbonDefault</item>
<item name="ribbonWarningColor">@color/ribbonWarning</item>
<item name="ribbonCriticalColor">@color/ribbonCritical</item>
<item name="ribbonTextDefaultColor">@color/ribbonTextDefault</item>
<item name="ribbonTextWarningColor">@color/ribbonTextWarning</item>
<!---Main Activity Tab --> <!---Main Activity Tab -->
<item name="tabSelectedTextColor">@color/tabSelectedText</item> <item name="tabSelectedTextColor">@color/tabSelectedText</item>
<item name="tabTextColor">@color/tabText</item> <item name="tabTextColor">@color/tabText</item>
@ -115,6 +119,17 @@
<item name="android:windowBackground">@color/black</item> <item name="android:windowBackground">@color/black</item>
<!---Dialogfragment Background Color --> <!---Dialogfragment Background Color -->
<item name="android:dialogCornerRadius">12dp</item> <item name="android:dialogCornerRadius">12dp</item>
<!---Overview and Historybrowser -->
<item name="graphgrid">@color/graphgrid</item>
<item name="viewPortbackgroundColor">@color/white_alpha_20</item>
<item name="tempTargetBackgroundColor">@color/tempTargetBackground</item>
<!---CGM source-->
<item name="cgmdexColor">@color/colorLightGray</item>
<item name="cgmxdripColor">@color/colorCalibrationButton</item>
<!---BG color-->
<item name="bgLow">@color/low</item>
<item name="bgHigh">@color/high</item>
<item name="bgInRange">@color/inrange</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

@ -60,6 +60,10 @@
<attr name="activity_title_backgroundColor" format="reference|color" /> <attr name="activity_title_backgroundColor" format="reference|color" />
<!---Automation --> <!---Automation -->
<attr name="ribbonDefaultColor" format="reference|color" /> <attr name="ribbonDefaultColor" format="reference|color" />
<attr name="ribbonWarningColor" format="reference|color" />
<attr name="ribbonCriticalColor" format="reference|color" />
<attr name="ribbonTextDefaultColor" format="reference|color" />
<attr name="ribbonTextWarningColor" format="reference|color" />
<!---Main Activity Tab --> <!---Main Activity Tab -->
<attr name="tabSelectedTextColor" format="reference|color" /> <attr name="tabSelectedTextColor" format="reference|color" />
<attr name="tabTextColor" format="reference|color" /> <attr name="tabTextColor" format="reference|color" />
@ -86,5 +90,15 @@
<attr name="splashBackgroundColor" format="reference|color" /> <attr name="splashBackgroundColor" format="reference|color" />
<!---Disabled Text Color --> <!---Disabled Text Color -->
<attr name="disabledTextColor" format="reference|color" /> <attr name="disabledTextColor" format="reference|color" />
<!---Overview and Historybrowser -->
<attr name="graphgrid" format="reference|color" />
<attr name="viewPortbackgroundColor" format="reference|color" />
<attr name="tempTargetBackgroundColor" format="reference|color" />
<!---CGM source-->
<attr name="cgmdexColor" format="reference|color" />
<attr name="cgmxdripColor" format="reference|color" />
<!---BG color-->
<attr name="bgLow" format="reference|color" />
<attr name="bgHigh" format="reference|color" />
<attr name="bgInRange" format="reference|color" />
</resources> </resources>

View file

@ -150,7 +150,7 @@
<color name="ribbonWarning">#f4d700</color> <color name="ribbonWarning">#f4d700</color>
<color name="ribbonCritical">#ff0400</color> <color name="ribbonCritical">#ff0400</color>
<color name="ribbonTextDefault">#FFFFFF</color> <color name="ribbonTextDefault">#000000</color>
<color name="ribbonTextWarning">#303030</color> <color name="ribbonTextWarning">#303030</color>
<color name="tempTargetConfirmation">#77dd77</color> <color name="tempTargetConfirmation">#77dd77</color>

View file

@ -91,6 +91,10 @@
<item name="activity_title_backgroundColor">@color/activity_title_background</item> <item name="activity_title_backgroundColor">@color/activity_title_background</item>
<!---Automation --> <!---Automation -->
<item name="ribbonDefaultColor">@color/ribbonDefault</item> <item name="ribbonDefaultColor">@color/ribbonDefault</item>
<item name="ribbonWarningColor">@color/ribbonWarning</item>
<item name="ribbonCriticalColor">@color/ribbonCritical</item>
<item name="ribbonTextDefaultColor">@color/ribbonTextDefault</item>
<item name="ribbonTextWarningColor">@color/ribbonTextWarning</item>
<!---Main Activity Tab --> <!---Main Activity Tab -->
<item name="tabSelectedTextColor">@color/tabSelectedText</item> <item name="tabSelectedTextColor">@color/tabSelectedText</item>
<item name="tabTextColor">@color/tabText</item> <item name="tabTextColor">@color/tabText</item>
@ -114,6 +118,17 @@
<item name="android:windowBackground">@color/white</item> <item name="android:windowBackground">@color/white</item>
<!---Dialogfragment Background Color --> <!---Dialogfragment Background Color -->
<item name="android:dialogCornerRadius">12dp</item> <item name="android:dialogCornerRadius">12dp</item>
<!---Overview and Historybrowser -->
<item name="graphgrid">@color/graphgrid</item>
<item name="viewPortbackgroundColor">@color/white_alpha_20</item>
<item name="tempTargetBackgroundColor">@color/tempTargetBackground</item>
<!---CGM source-->
<item name="cgmdexColor">@color/colorLightGray</item>
<item name="cgmxdripColor">@color/colorCalibrationButton</item>
<!---BG color-->
<item name="bgLow">@color/low</item>
<item name="bgHigh">@color/high</item>
<item name="bgInRange">@color/inrange</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"/>