From bf3ce735bcfbb78e540fd5015fe50cf5322170b6 Mon Sep 17 00:00:00 2001 From: Nico Schmitz Date: Thu, 14 Jun 2018 23:22:15 +0200 Subject: [PATCH] Set colors of profile view --- .../androidaps/plugins/Overview/OverviewFragment.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/Overview/OverviewFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/Overview/OverviewFragment.java index 02053c0b9c..4127ce49a0 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/Overview/OverviewFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/Overview/OverviewFragment.java @@ -1210,8 +1210,13 @@ public class OverviewFragment extends Fragment implements View.OnClickListener, } activeProfileView.setText(MainApp.getConfigBuilder().getProfileName()); - activeProfileView.setBackgroundColor(MainApp.gc(R.color.ribbonBgDefault)); - activeProfileView.setTextColor(MainApp.gc(R.color.ribbonTextDefault)); + if (profile.getPercentage() != 100 || profile.getTimeshift() != 0) { + activeProfileView.setBackgroundColor(MainApp.gc(R.color.ribbonBgWarning)); + activeProfileView.setTextColor(MainApp.gc(R.color.ribbonTextWarning)); + } else { + activeProfileView.setBackgroundColor(MainApp.gc(R.color.ribbonBgDefault)); + activeProfileView.setTextColor(MainApp.gc(R.color.ribbonTextDefault)); + } tempTargetView.setOnLongClickListener(view -> { view.performHapticFeedback(HapticFeedbackConstants.LONG_PRESS);