From 42418d41466071de6f4c0fd31965b86e41e55e8b Mon Sep 17 00:00:00 2001 From: Johannes Mockenhaupt Date: Thu, 21 Dec 2017 22:43:34 +0100 Subject: [PATCH] ComboFragment: make warning/error bold for a better readability. On lower DPI devices they're already bold, but on higher DPI devices the yellow "Low" is hardly discernible from white. (cherry picked from commit 693ba73) --- .../androidaps/plugins/PumpCombo/ComboFragment.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboFragment.java index 4613caf208..9d02873c21 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboFragment.java @@ -4,6 +4,7 @@ package info.nightscout.androidaps.plugins.PumpCombo; import android.app.Activity; import android.app.AlertDialog; import android.graphics.Color; +import android.graphics.Typeface; import android.os.Bundle; import android.text.Spanned; import android.view.LayoutInflater; @@ -137,11 +138,14 @@ public class ComboFragment extends SubscriberFragment implements View.OnClickLis if (ps.insulinState == PumpState.EMPTY || ps.batteryState == PumpState.EMPTY || ps.activeAlert != null && ps.activeAlert.errorCode != null) { stateView.setTextColor(Color.RED); + stateView.setTypeface(null, Typeface.BOLD); } else if (plugin.getPump().state.suspended || ps.activeAlert != null && ps.activeAlert.warningCode != null) { stateView.setTextColor(Color.YELLOW); + stateView.setTypeface(null, Typeface.BOLD); } else { stateView.setTextColor(Color.WHITE); + stateView.setTypeface(null, Typeface.NORMAL); } // activity @@ -171,12 +175,15 @@ public class ComboFragment extends SubscriberFragment implements View.OnClickLis if (ps.insulinState == PumpState.LOW) { reservoirView.setTextColor(Color.YELLOW); reservoirView.setText(R.string.combo_reservoir_low); + reservoirView.setTypeface(null, Typeface.BOLD); } else if (ps.insulinState == PumpState.EMPTY) { reservoirView.setTextColor(Color.RED); reservoirView.setText(R.string.combo_reservoir_empty); + reservoirView.setTypeface(null, Typeface.BOLD); } else { reservoirView.setTextColor(Color.WHITE); reservoirView.setText(R.string.combo_reservoir_normal); + reservoirView.setTypeface(null, Typeface.NORMAL); } // last connection