diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewFragment.java
index 9afa7adda8..7418ea0818 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewFragment.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewFragment.java
@@ -197,7 +197,7 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
Handler sLoopHandler = new Handler();
Runnable sRefreshLoop = null;
- public enum CHARTTYPE {PRE, BAS, IOB, COB, DEV, SEN, DEVSLOPE}
+ public enum CHARTTYPE {PRE, BAS, IOB, COB, DEV, SEN, ACT, DEVSLOPE}
private static final ScheduledExecutorService worker = Executors.newSingleThreadScheduledExecutor();
private static ScheduledFuture> scheduledUpdate = null;
@@ -413,6 +413,14 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
item.setCheckable(true);
item.setChecked(SP.getBoolean("showratios", false));
+ item = popup.getMenu().add(Menu.NONE, CHARTTYPE.ACT.ordinal(), Menu.NONE, MainApp.gs(R.string.overview_show_activity));
+ title = item.getTitle();
+ s = new SpannableString(title);
+ s.setSpan(new ForegroundColorSpan(ResourcesCompat.getColor(getResources(), R.color.activity, null)), 0, s.length(), 0);
+ item.setTitle(s);
+ item.setCheckable(true);
+ item.setChecked(SP.getBoolean("showactivity", true));
+
if (MainApp.devBranch) {
item = popup.getMenu().add(Menu.NONE, CHARTTYPE.DEVSLOPE.ordinal(), Menu.NONE, "Deviation slope");
title = item.getTitle();
@@ -438,6 +446,8 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
SP.putBoolean("showdeviations", !item.isChecked());
} else if (item.getItemId() == CHARTTYPE.SEN.ordinal()) {
SP.putBoolean("showratios", !item.isChecked());
+ } else if (item.getItemId() == CHARTTYPE.ACT.ordinal()) {
+ SP.putBoolean("showactivity", !item.isChecked());
} else if (item.getItemId() == CHARTTYPE.DEVSLOPE.ordinal()) {
SP.putBoolean("showdevslope", !item.isChecked());
}
@@ -1523,8 +1533,9 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
// set manual x bounds to have nice steps
graphData.formatAxis(fromTime, endTime);
- // insulin activity
- graphData.addActivity(fromTime, endTime, graphData.maxY);
+ if(SP.getBoolean("showactivity", true)) {
+ graphData.addActivity(fromTime, endTime, graphData.maxY);
+ }
// Treatments
graphData.addTreatments(fromTime, endTime);
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/graphData/GraphData.java b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/graphData/GraphData.java
index 9b1ff1edb9..3660ab8553 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/graphData/GraphData.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/graphData/GraphData.java
@@ -367,7 +367,7 @@ public class GraphData {
actData = actArray.toArray(actData);
actSeries = new FixedLineGraphSeries<>(actData);
actSeries.setDrawBackground(false);
- actSeries.setColor(MainApp.gc(R.color.mdtp_white));
+ actSeries.setColor(MainApp.gc(R.color.activity));
actSeries.setThickness(3);
actScale.setMultiplier(scale / 0.04d); //TODO for clarity should be fixed scale, but what max? For now 0.04d seems reasonable.
diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml
index a70ff9fc9b..67499f3a2c 100644
--- a/app/src/main/res/values/colors.xml
+++ b/app/src/main/res/values/colors.xml
@@ -9,6 +9,7 @@
#c9bd60
#00d2d2
#FFFFFF
+ #d3f166
#FFFFFF00
#FFFF00FF
#00FF00
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 9620b64a50..55a12c579d 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -1001,6 +1001,7 @@
Autobackfill missig BGs from NS
ns_autobackfill
SMB set by pump
+ Activity
Sensitivity
Deviations
Carbs On Board