From b7f4dd3366040e4c6fbb981458363e2cea36fdbc Mon Sep 17 00:00:00 2001 From: AdrianLxM Date: Wed, 2 Nov 2016 18:26:16 +0100 Subject: [PATCH] borders again on loopmode label --- .../androidaps/plugins/Overview/OverviewFragment.java | 4 ++-- app/src/main/res/drawable/loopmodedisabledborder.xml | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 app/src/main/res/drawable/loopmodedisabledborder.xml 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 9952443a44..401c612c75 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 @@ -430,7 +430,7 @@ public class OverviewFragment extends Fragment { final LoopPlugin.LastRun finalLastRun = LoopPlugin.lastRun; if (Config.APS) { apsModeView.setVisibility(View.VISIBLE); - apsModeView.setBackgroundColor(ContextCompat.getColor(getContext(), R.color.colorCancelTempButton)); + apsModeView.setBackgroundResource(R.drawable.loopmodeborder); LoopPlugin activeloop = MainApp.getConfigBuilder().getActiveLoop(); if(activeloop != null && activeloop.isEnabled(activeloop.getType())) { if (MainApp.getConfigBuilder().isClosedModeEnabled()) { @@ -439,7 +439,7 @@ public class OverviewFragment extends Fragment { apsModeView.setText(MainApp.sResources.getString(R.string.openloop)); } } else { - apsModeView.setBackgroundColor(ContextCompat.getColor(getContext(), R.color.colorSetExtendedButton)); + apsModeView.setBackgroundResource(R.drawable.loopmodedisabledborder); apsModeView.setText(MainApp.sResources.getString(R.string.disabledloop)); } } else { diff --git a/app/src/main/res/drawable/loopmodedisabledborder.xml b/app/src/main/res/drawable/loopmodedisabledborder.xml new file mode 100644 index 0000000000..1d312404e0 --- /dev/null +++ b/app/src/main/res/drawable/loopmodedisabledborder.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file