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 5592b356a8..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
@@ -11,6 +11,7 @@ import android.os.Handler;
import android.os.HandlerThread;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
+import android.support.v4.content.ContextCompat;
import android.support.v7.app.AlertDialog;
import android.view.LayoutInflater;
import android.view.View;
@@ -429,9 +430,18 @@ public class OverviewFragment extends Fragment {
final LoopPlugin.LastRun finalLastRun = LoopPlugin.lastRun;
if (Config.APS) {
apsModeView.setVisibility(View.VISIBLE);
- if (MainApp.getConfigBuilder().isClosedModeEnabled())
- apsModeView.setText(MainApp.sResources.getString(R.string.closedloop));
- else apsModeView.setText(MainApp.sResources.getString(R.string.openloop));
+ apsModeView.setBackgroundResource(R.drawable.loopmodeborder);
+ LoopPlugin activeloop = MainApp.getConfigBuilder().getActiveLoop();
+ if(activeloop != null && activeloop.isEnabled(activeloop.getType())) {
+ if (MainApp.getConfigBuilder().isClosedModeEnabled()) {
+ apsModeView.setText(MainApp.sResources.getString(R.string.closedloop));
+ } else {
+ apsModeView.setText(MainApp.sResources.getString(R.string.openloop));
+ }
+ } else {
+ apsModeView.setBackgroundResource(R.drawable.loopmodedisabledborder);
+ apsModeView.setText(MainApp.sResources.getString(R.string.disabledloop));
+ }
} else {
apsModeView.setVisibility(View.GONE);
}
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
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index cc4efc71b0..6e86355943 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -132,6 +132,8 @@
Closed Loop
Open Loop
+ Loop Disabled
+
New suggestion available
Unsupported version of NSClient
NSClient not installed. Record lost!