diff --git a/app/build.gradle b/app/build.gradle index 3bb7d2943a..b1da089c05 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -44,7 +44,7 @@ android { minSdkVersion 21 targetSdkVersion 23 versionCode 1500 - version "1.5d" + version "1.5e" buildConfigField "String", "VERSION", '"' + version + '"' buildConfigField "String", "BUILDVERSION", generateGitBuild() } diff --git a/app/src/main/java/info/nightscout/androidaps/db/TempTarget.java b/app/src/main/java/info/nightscout/androidaps/db/TempTarget.java index 5aaeea1daa..3bbdcbc06c 100644 --- a/app/src/main/java/info/nightscout/androidaps/db/TempTarget.java +++ b/app/src/main/java/info/nightscout/androidaps/db/TempTarget.java @@ -51,7 +51,7 @@ public class TempTarget implements Interval { return false; if (high != other.high) return false; - if (reason != other.reason) + if (!Objects.equals(reason, other.reason)) return false; if (!Objects.equals(_id, other._id)) return false; diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/Actions/ActionsFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/Actions/ActionsFragment.java index bc2c0adb86..b62674c5ae 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/Actions/ActionsFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/Actions/ActionsFragment.java @@ -31,11 +31,12 @@ import info.nightscout.androidaps.plugins.Actions.dialogs.NewTempBasalDialog; import info.nightscout.androidaps.plugins.Careportal.CareportalFragment; import info.nightscout.androidaps.plugins.Careportal.Dialogs.NewNSTreatmentDialog; import info.nightscout.androidaps.plugins.Careportal.OptionsToShow; +import info.nightscout.androidaps.plugins.Common.SubscriberFragment; /** * A simple {@link Fragment} subclass. */ -public class ActionsFragment extends Fragment implements View.OnClickListener { +public class ActionsFragment extends SubscriberFragment implements View.OnClickListener { static ActionsPlugin actionsPlugin = new ActionsPlugin(); @@ -82,43 +83,32 @@ public class ActionsFragment extends Fragment implements View.OnClickListener { tempBasal.setOnClickListener(this); fill.setOnClickListener(this); - updateGUIIfVisible(); + updateGUI(); return view; } - @Override - public void onPause() { - super.onPause(); - MainApp.bus().unregister(this); - } - - @Override - public void onResume() { - super.onResume(); - MainApp.bus().register(this); - } - @Subscribe public void onStatusEvent(final EventInitializationChanged ev) { - updateGUIIfVisible(); + updateGUI(); } @Subscribe public void onStatusEvent(final EventRefreshOverview ev) { - updateGUIIfVisible(); + updateGUI(); } @Subscribe public void onStatusEvent(final EventExtendedBolusChange ev) { - updateGUIIfVisible(); + updateGUI(); } @Subscribe public void onStatusEvent(final EventTempBasalChange ev) { - updateGUIIfVisible(); + updateGUI(); } - void updateGUIIfVisible() { + @Override + protected void updateGUI() { Activity activity = getActivity(); if (activity != null) activity.runOnUiThread(new Runnable() { diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/Careportal/CareportalFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/Careportal/CareportalFragment.java index abc67c4c39..6ddda8cd68 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/Careportal/CareportalFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/Careportal/CareportalFragment.java @@ -19,9 +19,10 @@ import info.nightscout.androidaps.R; import info.nightscout.androidaps.db.CareportalEvent; import info.nightscout.androidaps.events.EventCareportalEventChange; import info.nightscout.androidaps.plugins.Careportal.Dialogs.NewNSTreatmentDialog; +import info.nightscout.androidaps.plugins.Common.SubscriberFragment; import info.nightscout.androidaps.plugins.Overview.OverviewFragment; -public class CareportalFragment extends Fragment implements View.OnClickListener { +public class CareportalFragment extends SubscriberFragment implements View.OnClickListener { static CareportalPlugin careportalPlugin; @@ -178,24 +179,13 @@ public class CareportalFragment extends Fragment implements View.OnClickListener newDialog.show(manager, "NewNSTreatmentDialog"); } - @Override - public void onPause() { - super.onPause(); - MainApp.bus().unregister(this); - } - - @Override - public void onResume() { - super.onResume(); - MainApp.bus().register(this); - } - @Subscribe public void onStatusEvent(final EventCareportalEventChange c) { updateGUI(); } - void updateGUI() { + @Override + protected void updateGUI() { Activity activity = getActivity(); updateAge(activity, sage, iage, cage, pbage); } diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/Common/SubscriberFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/Common/SubscriberFragment.java new file mode 100644 index 0000000000..74abc837fe --- /dev/null +++ b/app/src/main/java/info/nightscout/androidaps/plugins/Common/SubscriberFragment.java @@ -0,0 +1,22 @@ +package info.nightscout.androidaps.plugins.Common; + +import android.support.v4.app.Fragment; + +import info.nightscout.androidaps.MainApp; + +abstract public class SubscriberFragment extends Fragment { + @Override + public void onPause() { + super.onPause(); + MainApp.bus().unregister(this); + } + + @Override + public void onResume() { + super.onResume(); + MainApp.bus().register(this); + updateGUI(); + } + + protected abstract void updateGUI(); +} diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/ConfigBuilder/ConfigBuilderPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/ConfigBuilder/ConfigBuilderPlugin.java index 523dff8939..0629011397 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/ConfigBuilder/ConfigBuilderPlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/ConfigBuilder/ConfigBuilderPlugin.java @@ -83,7 +83,6 @@ public class ConfigBuilderPlugin implements PluginBase, PumpInterface, Constrain MainApp.bus().register(this); PowerManager powerManager = (PowerManager) MainApp.instance().getApplicationContext().getSystemService(Context.POWER_SERVICE); mWakeLock = powerManager.newWakeLock(PowerManager.SCREEN_DIM_WAKE_LOCK, "ConfigBuilderPlugin"); - ; } @Override diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/InsulinFastacting/ActivityGraph.java b/app/src/main/java/info/nightscout/androidaps/plugins/InsulinFastacting/ActivityGraph.java index 2d4795a3ec..a2181a3a15 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/InsulinFastacting/ActivityGraph.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/InsulinFastacting/ActivityGraph.java @@ -63,6 +63,7 @@ public class ActivityGraph extends GraphView { getViewport().setMaxX(hours * 60); getGridLabelRenderer().setNumHorizontalLabels(hours + 1); getGridLabelRenderer().setHorizontalAxisTitle("[min]"); + getGridLabelRenderer().setVerticalLabelsColor(activitySeries.getColor()); DataPoint[] iobDataPoints = new DataPoint[iobArray.size()]; iobDataPoints = iobArray.toArray(iobDataPoints); @@ -72,5 +73,6 @@ public class ActivityGraph extends GraphView { iobSeries.setBackgroundColor(Color.argb(70, 255, 0, 255)); getSecondScale().setMinY(0); getSecondScale().setMaxY(1); + getGridLabelRenderer().setVerticalLabelsSecondScaleColor(Color.MAGENTA); } } diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/InsulinFastacting/InsulinFastactingFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/InsulinFastacting/InsulinFastactingFragment.java index a99e016621..84741656f5 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/InsulinFastacting/InsulinFastactingFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/InsulinFastacting/InsulinFastactingFragment.java @@ -35,12 +35,22 @@ public class InsulinFastactingFragment extends Fragment { insulinDia = (TextView) view.findViewById(R.id.insulin_dia); insulinGraph = (ActivityGraph) view.findViewById(R.id.insuling_graph); - insulinName.setText(insulinFastactingPlugin.getFriendlyName()); - insulinComment.setText(insulinFastactingPlugin.getComment()); - insulinDia.setText(MainApp.sResources.getText(R.string.dia) + " " + new Double(insulinFastactingPlugin.getDia()).toString() + "h"); - insulinGraph.show(insulinFastactingPlugin); + updateGUI(); return view; } + @Override + public void onResume() { + super.onResume(); + updateGUI(); + } + + private void updateGUI() { + insulinName.setText(insulinFastactingPlugin.getFriendlyName()); + insulinComment.setText(insulinFastactingPlugin.getComment()); + insulinDia.setText(MainApp.sResources.getText(R.string.dia) + " " + new Double(insulinFastactingPlugin.getDia()).toString() + "h"); + insulinGraph.show(insulinFastactingPlugin); + } + } diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/InsulinFastactingProlonged/InsulinFastactingProlongedFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/InsulinFastactingProlonged/InsulinFastactingProlongedFragment.java index acc915b001..e1d0143934 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/InsulinFastactingProlonged/InsulinFastactingProlongedFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/InsulinFastactingProlonged/InsulinFastactingProlongedFragment.java @@ -36,12 +36,22 @@ public class InsulinFastactingProlongedFragment extends Fragment { insulinDia = (TextView) view.findViewById(R.id.insulin_dia); insulinGraph = (ActivityGraph) view.findViewById(R.id.insuling_graph); - insulinName.setText(insulinFastactingProlongedPlugin.getFriendlyName()); - insulinComment.setText(insulinFastactingProlongedPlugin.getComment()); - insulinDia.setText(MainApp.sResources.getText(R.string.dia) + " " + new Double(insulinFastactingProlongedPlugin.getDia()).toString() + "h"); - insulinGraph.show(insulinFastactingProlongedPlugin); + updateGUI(); return view; } + @Override + public void onResume() { + super.onResume(); + updateGUI(); + } + + private void updateGUI() { + insulinName.setText(insulinFastactingProlongedPlugin.getFriendlyName()); + insulinComment.setText(insulinFastactingProlongedPlugin.getComment()); + insulinDia.setText(MainApp.sResources.getText(R.string.dia) + " " + new Double(insulinFastactingProlongedPlugin.getDia()).toString() + "h"); + insulinGraph.show(insulinFastactingProlongedPlugin); + } + } diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/Loop/LoopFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/Loop/LoopFragment.java index de295d8a6e..2fb143517b 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/Loop/LoopFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/Loop/LoopFragment.java @@ -3,7 +3,6 @@ package info.nightscout.androidaps.plugins.Loop; import android.app.Activity; import android.os.Bundle; -import android.support.v4.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -19,10 +18,11 @@ import org.slf4j.LoggerFactory; import info.nightscout.androidaps.MainApp; import info.nightscout.androidaps.R; +import info.nightscout.androidaps.plugins.Common.SubscriberFragment; import info.nightscout.androidaps.plugins.Loop.events.EventLoopSetLastRunGui; import info.nightscout.androidaps.plugins.Loop.events.EventLoopUpdateGui; -public class LoopFragment extends Fragment implements View.OnClickListener { +public class LoopFragment extends SubscriberFragment implements View.OnClickListener { private static Logger log = LoggerFactory.getLogger(LoopFragment.class); private static LoopPlugin loopPlugin; @@ -61,18 +61,6 @@ public class LoopFragment extends Fragment implements View.OnClickListener { return view; } - @Override - public void onPause() { - super.onPause(); - MainApp.bus().unregister(this); - } - - @Override - public void onResume() { - super.onResume(); - MainApp.bus().register(this); - } - @Override public void onClick(View view) { switch (view.getId()) { @@ -110,7 +98,8 @@ public class LoopFragment extends Fragment implements View.OnClickListener { } - void updateGUI() { + @Override + protected void updateGUI() { Activity activity = getActivity(); if (activity != null) activity.runOnUiThread(new Runnable() { diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/NSClientInternal/NSClientInternalFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/NSClientInternal/NSClientInternalFragment.java index 3e37bf71d7..164e9902df 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/NSClientInternal/NSClientInternalFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/NSClientInternal/NSClientInternalFragment.java @@ -28,12 +28,13 @@ import org.slf4j.LoggerFactory; import info.nightscout.androidaps.MainApp; import info.nightscout.androidaps.R; import info.nightscout.androidaps.events.EventPreferenceChange; +import info.nightscout.androidaps.plugins.Common.SubscriberFragment; import info.nightscout.androidaps.plugins.NSClientInternal.events.EventNSClientNewLog; import info.nightscout.androidaps.plugins.NSClientInternal.events.EventNSClientRestart; import info.nightscout.androidaps.plugins.NSClientInternal.events.EventNSClientUpdateGUI; import info.nightscout.utils.SP; -public class NSClientInternalFragment extends Fragment implements View.OnClickListener, CompoundButton.OnCheckedChangeListener { +public class NSClientInternalFragment extends SubscriberFragment implements View.OnClickListener, CompoundButton.OnCheckedChangeListener { private static Logger log = LoggerFactory.getLogger(NSClientInternalFragment.class); static NSClientInternalPlugin nsClientInternalPlugin; @@ -150,25 +151,13 @@ public class NSClientInternalFragment extends Fragment implements View.OnClickLi } } - @Override - public void onPause() { - super.onPause(); - MainApp.bus().unregister(this); - } - - @Override - public void onResume() { - super.onResume(); - MainApp.bus().register(this); - updateGUI(); - } - @Subscribe public void onStatusEvent(final EventNSClientUpdateGUI ev) { updateGUI(); } - private void updateGUI() { + @Override + protected void updateGUI() { Activity activity = getActivity(); if (activity != null) activity.runOnUiThread(new Runnable() { diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/NSClientInternal/broadcasts/BroadcastStatus.java b/app/src/main/java/info/nightscout/androidaps/plugins/NSClientInternal/broadcasts/BroadcastStatus.java index 15432c8e79..026658afc0 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/NSClientInternal/broadcasts/BroadcastStatus.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/NSClientInternal/broadcasts/BroadcastStatus.java @@ -33,7 +33,7 @@ public class BroadcastStatus { bundle.putInt("nsclientversioncode", MainApp.instance().getPackageManager().getPackageInfo(MainApp.instance().getPackageName(), 0).versionCode); } catch (PackageManager.NameNotFoundException e) { e.printStackTrace(); - }; + } bundle.putString("nightscoutversionname", NSClientService.nightscoutVersionName); bundle.putInt("nightscoutversioncode", NSClientService.nightscoutVersionCode); bundle.putString("status", status.getData().toString()); diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/NSClientInternal/data/NSSettingsStatus.java b/app/src/main/java/info/nightscout/androidaps/plugins/NSClientInternal/data/NSSettingsStatus.java index 3201d62f6e..4980b342e9 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/NSClientInternal/data/NSSettingsStatus.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/NSClientInternal/data/NSSettingsStatus.java @@ -207,8 +207,6 @@ public class NSSettingsStatus { return ret; } - ; - private Integer getIntegerOrNull(String key) { Integer ret = null; if (data.has(key)) { @@ -221,8 +219,6 @@ public class NSSettingsStatus { return ret; } - ; - private Long getLongOrNull(String key) { Long ret = null; if (data.has(key)) { @@ -235,8 +231,6 @@ public class NSSettingsStatus { return ret; } - ; - private Date getDateOrNull(String key) { Date ret = null; if (data.has(key)) { @@ -249,8 +243,6 @@ public class NSSettingsStatus { return ret; } - ; - private boolean getBooleanOrNull(String key) { boolean ret = false; if (data.has(key)) { diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/NSClientInternal/data/NSSgv.java b/app/src/main/java/info/nightscout/androidaps/plugins/NSClientInternal/data/NSSgv.java index c8666f4306..78ddc7a8f7 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/NSClientInternal/data/NSSgv.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/NSClientInternal/data/NSSgv.java @@ -24,7 +24,7 @@ public class NSSgv { } } return ret; - }; + } private Integer getIntegerOrNull(String key) { Integer ret = null; @@ -36,7 +36,7 @@ public class NSSgv { } } return ret; - }; + } private Long getLongOrNull(String key) { Long ret = null; @@ -48,7 +48,7 @@ public class NSSgv { } } return ret; - }; + } public JSONObject getData () { return data; } public Integer getMgdl () { return getIntegerOrNull("mgdl"); } diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/NSClientInternal/data/NSTreatment.java b/app/src/main/java/info/nightscout/androidaps/plugins/NSClientInternal/data/NSTreatment.java index 7430caf600..1b48f27e2f 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/NSClientInternal/data/NSTreatment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/NSClientInternal/data/NSTreatment.java @@ -25,7 +25,7 @@ public class NSTreatment { } } return ret; - }; + } private Double getDoubleOrNull(String key) { Double ret = null; @@ -37,7 +37,7 @@ public class NSTreatment { } } return ret; - }; + } private Integer getIntegerOrNull(String key) { Integer ret = null; @@ -49,7 +49,7 @@ public class NSTreatment { } } return ret; - }; + } private Long getLongOrNull(String key) { Long ret = null; @@ -61,7 +61,7 @@ public class NSTreatment { } } return ret; - }; + } private Date getDateOrNull(String key) { Date ret = null; @@ -73,7 +73,7 @@ public class NSTreatment { } } return ret; - }; + } public String getAction() { return action; } public JSONObject getData() { return data; } diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/OpenAPSAMA/DetermineBasalResultAMA.java b/app/src/main/java/info/nightscout/androidaps/plugins/OpenAPSAMA/DetermineBasalResultAMA.java index c086ff2cd5..c2a55ff894 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/OpenAPSAMA/DetermineBasalResultAMA.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/OpenAPSAMA/DetermineBasalResultAMA.java @@ -43,7 +43,7 @@ public class DetermineBasalResultAMA extends APSResult { } if (result.contains("duration")) { duration = result.getInteger("duration"); - changeRequested = changeRequested; + //changeRequested as above } else { duration = -1; changeRequested = false; diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/OpenAPSAMA/OpenAPSAMAFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/OpenAPSAMA/OpenAPSAMAFragment.java index c480ebfe3c..419a55f057 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/OpenAPSAMA/OpenAPSAMAFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/OpenAPSAMA/OpenAPSAMAFragment.java @@ -20,11 +20,12 @@ import org.slf4j.LoggerFactory; import info.nightscout.androidaps.MainApp; import info.nightscout.androidaps.R; +import info.nightscout.androidaps.plugins.Common.SubscriberFragment; import info.nightscout.androidaps.plugins.OpenAPSMA.events.EventOpenAPSUpdateGui; import info.nightscout.androidaps.plugins.OpenAPSMA.events.EventOpenAPSUpdateResultGui; import info.nightscout.utils.JSONFormatter; -public class OpenAPSAMAFragment extends Fragment implements View.OnClickListener { +public class OpenAPSAMAFragment extends SubscriberFragment implements View.OnClickListener { private static Logger log = LoggerFactory.getLogger(OpenAPSAMAFragment.class); private static OpenAPSAMAPlugin openAPSAMAPlugin; @@ -81,18 +82,6 @@ public class OpenAPSAMAFragment extends Fragment implements View.OnClickListener } - @Override - public void onPause() { - super.onPause(); - MainApp.bus().unregister(this); - } - - @Override - public void onResume() { - super.onResume(); - MainApp.bus().register(this); - } - @Subscribe public void onStatusEvent(final EventOpenAPSUpdateGui ev) { updateGUI(); @@ -103,7 +92,8 @@ public class OpenAPSAMAFragment extends Fragment implements View.OnClickListener updateResultGUI(ev.text); } - void updateGUI() { + @Override + protected void updateGUI() { Activity activity = getActivity(); if (activity != null) activity.runOnUiThread(new Runnable() { diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/OpenAPSMA/DetermineBasalResultMA.java b/app/src/main/java/info/nightscout/androidaps/plugins/OpenAPSMA/DetermineBasalResultMA.java index cb0e67249f..a0cd1a75b0 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/OpenAPSMA/DetermineBasalResultMA.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/OpenAPSMA/DetermineBasalResultMA.java @@ -41,7 +41,7 @@ public class DetermineBasalResultMA extends APSResult { } if (result.contains("duration")) { duration = result.getInteger("duration"); - changeRequested = changeRequested; + //changeRequested as above } else { duration = -1; changeRequested = false; diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/OpenAPSMA/OpenAPSMAFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/OpenAPSMA/OpenAPSMAFragment.java index 16249dffc3..90bfc301b1 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/OpenAPSMA/OpenAPSMAFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/OpenAPSMA/OpenAPSMAFragment.java @@ -18,11 +18,12 @@ import org.slf4j.LoggerFactory; import info.nightscout.androidaps.MainApp; import info.nightscout.androidaps.R; +import info.nightscout.androidaps.plugins.Common.SubscriberFragment; import info.nightscout.androidaps.plugins.OpenAPSMA.events.EventOpenAPSUpdateGui; import info.nightscout.androidaps.plugins.OpenAPSMA.events.EventOpenAPSUpdateResultGui; import info.nightscout.utils.JSONFormatter; -public class OpenAPSMAFragment extends Fragment implements View.OnClickListener { +public class OpenAPSMAFragment extends SubscriberFragment implements View.OnClickListener { private static Logger log = LoggerFactory.getLogger(OpenAPSMAFragment.class); private static OpenAPSMAPlugin openAPSMAPlugin; @@ -75,18 +76,6 @@ public class OpenAPSMAFragment extends Fragment implements View.OnClickListener } - @Override - public void onPause() { - super.onPause(); - MainApp.bus().unregister(this); - } - - @Override - public void onResume() { - super.onResume(); - MainApp.bus().register(this); - } - @Subscribe public void onStatusEvent(final EventOpenAPSUpdateGui ev) { updateGUI(); @@ -97,7 +86,8 @@ public class OpenAPSMAFragment extends Fragment implements View.OnClickListener updateResultGUI(ev.text); } - void updateGUI() { + @Override + protected void updateGUI() { Activity activity = getActivity(); if (activity != null) activity.runOnUiThread(new Runnable() { @@ -123,7 +113,7 @@ public class OpenAPSMAFragment extends Fragment implements View.OnClickListener }); } - void updateResultGUI(final String text) { + private void updateResultGUI(final String text) { Activity activity = getActivity(); if (activity != null) activity.runOnUiThread(new Runnable() { diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/Overview/Dialogs/WizardDialog.java b/app/src/main/java/info/nightscout/androidaps/plugins/Overview/Dialogs/WizardDialog.java index 0a1b5417a8..5d57f3caf1 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/Overview/Dialogs/WizardDialog.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/Overview/Dialogs/WizardDialog.java @@ -213,9 +213,7 @@ public class WizardDialog extends DialogFragment implements OnClickListener, Com bgTrendInsulin = (TextView) view.findViewById(R.id.treatments_wizard_bgtrendinsulin); cobLayout = (LinearLayout) view.findViewById(R.id.treatments_wizard_cob_layout); cob = (TextView) view.findViewById(R.id.treatments_wizard_cob); - ; cobInsulin = (TextView) view.findViewById(R.id.treatments_wizard_cobinsulin); - ; bgCheckbox = (CheckBox) view.findViewById(R.id.treatments_wizard_bgcheckbox); bolusIobCheckbox = (CheckBox) view.findViewById(R.id.treatments_wizard_bolusiobcheckbox); diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/ProfileCircadianPercentage/CircadianPercentageProfileFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/ProfileCircadianPercentage/CircadianPercentageProfileFragment.java index c70a66850f..c42f1d0c64 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/ProfileCircadianPercentage/CircadianPercentageProfileFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/ProfileCircadianPercentage/CircadianPercentageProfileFragment.java @@ -39,10 +39,11 @@ import info.nightscout.androidaps.interfaces.PumpInterface; import info.nightscout.androidaps.plugins.Careportal.CareportalFragment; import info.nightscout.androidaps.plugins.Careportal.Dialogs.NewNSTreatmentDialog; import info.nightscout.androidaps.plugins.Careportal.OptionsToShow; +import info.nightscout.androidaps.plugins.Common.SubscriberFragment; import info.nightscout.utils.DecimalFormatter; import info.nightscout.utils.SafeParse; -public class CircadianPercentageProfileFragment extends Fragment { +public class CircadianPercentageProfileFragment extends SubscriberFragment { private static Logger log = LoggerFactory.getLogger(CircadianPercentageProfileFragment.class); private static CircadianPercentageProfilePlugin circadianPercentageProfilePlugin = new CircadianPercentageProfilePlugin(); @@ -309,16 +310,14 @@ public class CircadianPercentageProfileFragment extends Fragment { percentageView.addTextChangedListener(textWatch); timeshiftView.addTextChangedListener(textWatch); - updateGui(); + updateGUI(); onStatusEvent(new EventInitializationChanged()); return layout; } - public void updateGui() { - - + public void updateGUI() { updateProfileInfo(); diaView.removeTextChangedListener(textWatch); @@ -434,7 +433,6 @@ public class CircadianPercentageProfileFragment extends Fragment { if (i == 0) { copyprevbutton.setVisibility(View.INVISIBLE); - ; } else { final int j = i; //needs to be final to be passed to inner class. copyprevbutton.setOnClickListener(new View.OnClickListener() { @@ -485,15 +483,12 @@ public class CircadianPercentageProfileFragment extends Fragment { } basalEditDialog = null; - MainApp.bus().unregister(this); fl.requestFocusFromTouch(); } @Override public void onResume() { super.onResume(); - updateGui(); - MainApp.bus().register(this); onStatusEvent(new EventInitializationChanged()); fl.requestFocusFromTouch(); } @@ -521,7 +516,7 @@ public class CircadianPercentageProfileFragment extends Fragment { activity.runOnUiThread(new Runnable() { @Override public void run() { - updateGui(); + updateGUI(); } }); } diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/ProfileLocal/LocalProfileFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/ProfileLocal/LocalProfileFragment.java index 97f32e232a..7161a1d9de 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/ProfileLocal/LocalProfileFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/ProfileLocal/LocalProfileFragment.java @@ -27,10 +27,11 @@ import info.nightscout.androidaps.interfaces.PumpInterface; import info.nightscout.androidaps.plugins.Careportal.CareportalFragment; import info.nightscout.androidaps.plugins.Careportal.Dialogs.NewNSTreatmentDialog; import info.nightscout.androidaps.plugins.Careportal.OptionsToShow; +import info.nightscout.androidaps.plugins.Common.SubscriberFragment; import info.nightscout.utils.SafeParse; import info.nightscout.utils.TimeListEdit; -public class LocalProfileFragment extends Fragment { +public class LocalProfileFragment extends SubscriberFragment { private static Logger log = LoggerFactory.getLogger(LocalProfileFragment.class); private static LocalProfilePlugin localProfilePlugin = new LocalProfilePlugin(); @@ -73,7 +74,7 @@ public class LocalProfileFragment extends Fragment { layout.findViewById(R.id.localprofile_basal).setVisibility(View.GONE); } - onStatusEvent(null); + updateGUI(); mgdlView.setChecked(localProfilePlugin.mgdl); mmolView.setChecked(localProfilePlugin.mmol); @@ -130,26 +131,18 @@ public class LocalProfileFragment extends Fragment { diaView.addTextChangedListener(textWatch); - onStatusEvent(null); + updateGUI(); return layout; } - @Override - public void onPause() { - super.onPause(); - MainApp.bus().unregister(this); - } - - @Override - public void onResume() { - super.onResume(); - MainApp.bus().register(this); - onStatusEvent(null); - } - @Subscribe public void onStatusEvent(final EventInitializationChanged e) { + updateGUI(); + } + + @Override + protected void updateGUI() { Activity activity = getActivity(); if (activity != null) activity.runOnUiThread(new Runnable() { diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/ProfileNS/NSProfileFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/ProfileNS/NSProfileFragment.java index f765fe6ed1..c8b5b2c5db 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/ProfileNS/NSProfileFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/ProfileNS/NSProfileFragment.java @@ -13,10 +13,11 @@ import com.squareup.otto.Subscribe; import info.nightscout.androidaps.MainApp; import info.nightscout.androidaps.R; import info.nightscout.androidaps.data.Profile; +import info.nightscout.androidaps.plugins.Common.SubscriberFragment; import info.nightscout.androidaps.plugins.ProfileNS.events.EventNSProfileUpdateGUI; import info.nightscout.utils.DecimalFormatter; -public class NSProfileFragment extends Fragment { +public class NSProfileFragment extends SubscriberFragment { private static NSProfilePlugin nsProfilePlugin = new NSProfilePlugin(); public static NSProfilePlugin getPlugin() { @@ -50,18 +51,6 @@ public class NSProfileFragment extends Fragment { return layout; } - @Override - public void onPause() { - super.onPause(); - MainApp.bus().unregister(this); - } - - @Override - public void onResume() { - super.onResume(); - MainApp.bus().register(this); - } - @Subscribe public void onStatusEvent(final EventNSProfileUpdateGUI ev) { Activity activity = getActivity(); @@ -74,7 +63,8 @@ public class NSProfileFragment extends Fragment { }); } - private void updateGUI() { + @Override + protected void updateGUI() { if (MainApp.getConfigBuilder().getProfile() == null) { noProfile.setVisibility(View.VISIBLE); return; diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/ProfileSimple/SimpleProfileFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/ProfileSimple/SimpleProfileFragment.java index 7d1f829849..a4e3a8eecf 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/ProfileSimple/SimpleProfileFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/ProfileSimple/SimpleProfileFragment.java @@ -25,9 +25,10 @@ import info.nightscout.androidaps.interfaces.PumpInterface; import info.nightscout.androidaps.plugins.Careportal.CareportalFragment; import info.nightscout.androidaps.plugins.Careportal.Dialogs.NewNSTreatmentDialog; import info.nightscout.androidaps.plugins.Careportal.OptionsToShow; +import info.nightscout.androidaps.plugins.Common.SubscriberFragment; import info.nightscout.utils.SafeParse; -public class SimpleProfileFragment extends Fragment { +public class SimpleProfileFragment extends SubscriberFragment { private static Logger log = LoggerFactory.getLogger(SimpleProfileFragment.class); private static SimpleProfilePlugin simpleProfilePlugin = new SimpleProfilePlugin(); @@ -66,7 +67,7 @@ public class SimpleProfileFragment extends Fragment { layout.findViewById(R.id.simpleprofile_basalrate_label).setVisibility(View.GONE); } - onStatusEvent(null); + updateGUI(); mgdlView.setChecked(simpleProfilePlugin.mgdl); mmolView.setChecked(simpleProfilePlugin.mmol); @@ -138,26 +139,18 @@ public class SimpleProfileFragment extends Fragment { targetlowView.addTextChangedListener(textWatch); targethighView.addTextChangedListener(textWatch); - onStatusEvent(null); + updateGUI(); return layout; } - @Override - public void onPause() { - super.onPause(); - MainApp.bus().unregister(this); - } - - @Override - public void onResume() { - super.onResume(); - MainApp.bus().register(this); - onStatusEvent(null); - } - @Subscribe public void onStatusEvent(final EventInitializationChanged e) { + updateGUI(); + } + + @Override + protected void updateGUI() { Activity activity = getActivity(); if (activity != null) activity.runOnUiThread(new Runnable() { diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaR/DanaRFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaR/DanaRFragment.java index 1780b1a53f..87c635cbef 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaR/DanaRFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaR/DanaRFragment.java @@ -27,6 +27,7 @@ import info.nightscout.androidaps.R; import info.nightscout.androidaps.events.EventExtendedBolusChange; import info.nightscout.androidaps.events.EventPumpStatusChanged; import info.nightscout.androidaps.events.EventTempBasalChange; +import info.nightscout.androidaps.plugins.Common.SubscriberFragment; import info.nightscout.androidaps.plugins.PumpDanaR.Dialogs.ProfileViewDialog; import info.nightscout.androidaps.plugins.PumpDanaR.activities.DanaRHistoryActivity; import info.nightscout.androidaps.plugins.PumpDanaR.activities.DanaRStatsActivity; @@ -35,7 +36,7 @@ import info.nightscout.utils.DateUtil; import info.nightscout.utils.DecimalFormatter; import info.nightscout.utils.SetWarnColor; -public class DanaRFragment extends Fragment { +public class DanaRFragment extends SubscriberFragment { private static Logger log = LoggerFactory.getLogger(DanaRFragment.class); private static DanaRPlugin danaRPlugin; @@ -156,18 +157,6 @@ public class DanaRFragment extends Fragment { return view; } - @Override - public void onPause() { - super.onPause(); - MainApp.bus().unregister(this); - } - - @Override - public void onResume() { - super.onResume(); - MainApp.bus().register(this); - } - @Subscribe public void onStatusEvent(final EventPumpStatusChanged c) { Activity activity = getActivity(); @@ -204,7 +193,8 @@ public class DanaRFragment extends Fragment { } // GUI functions - private void updateGUI() { + @Override + protected void updateGUI() { Activity activity = getActivity(); if (activity != null && basaBasalRateView != null) activity.runOnUiThread(new Runnable() { diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaRKorean/DanaRKoreanFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaRKorean/DanaRKoreanFragment.java index 02e7e5ba24..50ec8883c6 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaRKorean/DanaRKoreanFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaRKorean/DanaRKoreanFragment.java @@ -27,6 +27,7 @@ import info.nightscout.androidaps.R; import info.nightscout.androidaps.events.EventExtendedBolusChange; import info.nightscout.androidaps.events.EventPumpStatusChanged; import info.nightscout.androidaps.events.EventTempBasalChange; +import info.nightscout.androidaps.plugins.Common.SubscriberFragment; import info.nightscout.androidaps.plugins.PumpDanaR.DanaRPump; import info.nightscout.androidaps.plugins.PumpDanaR.Dialogs.ProfileViewDialog; import info.nightscout.androidaps.plugins.PumpDanaR.activities.DanaRHistoryActivity; @@ -36,7 +37,7 @@ import info.nightscout.utils.DateUtil; import info.nightscout.utils.DecimalFormatter; import info.nightscout.utils.SetWarnColor; -public class DanaRKoreanFragment extends Fragment { +public class DanaRKoreanFragment extends SubscriberFragment { private static Logger log = LoggerFactory.getLogger(DanaRKoreanFragment.class); private static DanaRKoreanPlugin danaRKoreanPlugin = new DanaRKoreanPlugin(); @@ -154,18 +155,6 @@ public class DanaRKoreanFragment extends Fragment { return view; } - @Override - public void onPause() { - super.onPause(); - MainApp.bus().unregister(this); - } - - @Override - public void onResume() { - super.onResume(); - MainApp.bus().register(this); - } - @Subscribe public void onStatusEvent(final EventPumpStatusChanged c) { Activity activity = getActivity(); @@ -202,7 +191,8 @@ public class DanaRKoreanFragment extends Fragment { } // GUI functions - private void updateGUI() { + @Override + protected void updateGUI() { Activity activity = getActivity(); if (activity != null && basaBasalRateView != null) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaRv2/DanaRv2Fragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaRv2/DanaRv2Fragment.java index 9e87d45dca..7b92be30d8 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaRv2/DanaRv2Fragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaRv2/DanaRv2Fragment.java @@ -27,6 +27,7 @@ import info.nightscout.androidaps.R; import info.nightscout.androidaps.events.EventExtendedBolusChange; import info.nightscout.androidaps.events.EventPumpStatusChanged; import info.nightscout.androidaps.events.EventTempBasalChange; +import info.nightscout.androidaps.plugins.Common.SubscriberFragment; import info.nightscout.androidaps.plugins.PumpDanaR.DanaRPump; import info.nightscout.androidaps.plugins.PumpDanaR.Dialogs.ProfileViewDialog; import info.nightscout.androidaps.plugins.PumpDanaR.activities.DanaRHistoryActivity; @@ -36,7 +37,7 @@ import info.nightscout.utils.DateUtil; import info.nightscout.utils.DecimalFormatter; import info.nightscout.utils.SetWarnColor; -public class DanaRv2Fragment extends Fragment { +public class DanaRv2Fragment extends SubscriberFragment { private static Logger log = LoggerFactory.getLogger(DanaRv2Fragment.class); private static DanaRv2Plugin danaRPlugin; @@ -153,18 +154,6 @@ public class DanaRv2Fragment extends Fragment { return view; } - @Override - public void onPause() { - super.onPause(); - MainApp.bus().unregister(this); - } - - @Override - public void onResume() { - super.onResume(); - MainApp.bus().register(this); - } - @Subscribe public void onStatusEvent(final EventPumpStatusChanged c) { Activity activity = getActivity(); @@ -201,7 +190,8 @@ public class DanaRv2Fragment extends Fragment { } // GUI functions - private void updateGUI() { + @Override + protected void updateGUI() { Activity activity = getActivity(); if (activity != null && basaBasalRateView != null) activity.runOnUiThread(new Runnable() { diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpVirtual/VirtualPumpFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpVirtual/VirtualPumpFragment.java index f1e709e329..2dfaefe482 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpVirtual/VirtualPumpFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpVirtual/VirtualPumpFragment.java @@ -5,7 +5,6 @@ import android.app.Activity; import android.os.Bundle; import android.os.Handler; import android.support.annotation.Nullable; -import android.support.v4.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -16,13 +15,12 @@ import com.squareup.otto.Subscribe; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import java.util.Date; - import info.nightscout.androidaps.MainApp; import info.nightscout.androidaps.R; +import info.nightscout.androidaps.plugins.Common.SubscriberFragment; import info.nightscout.androidaps.plugins.PumpVirtual.events.EventVirtualPumpUpdateGui; -public class VirtualPumpFragment extends Fragment { +public class VirtualPumpFragment extends SubscriberFragment { private static Logger log = LoggerFactory.getLogger(VirtualPumpFragment.class); TextView basaBasalRateView; @@ -63,24 +61,13 @@ public class VirtualPumpFragment extends Fragment { return view; } - @Override - public void onPause() { - super.onPause(); - MainApp.bus().unregister(this); - } - - @Override - public void onResume() { - super.onResume(); - MainApp.bus().register(this); - } - @Subscribe public void onStatusEvent(final EventVirtualPumpUpdateGui ev) { updateGUI(); } - public void updateGUI() { + @Override + protected void updateGUI() { Activity activity = getActivity(); if (activity != null && basaBasalRateView != null) activity.runOnUiThread(new Runnable() { diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/SmsCommunicator/SmsCommunicatorFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/SmsCommunicator/SmsCommunicatorFragment.java index 83973e83ff..09a635bf86 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/SmsCommunicator/SmsCommunicatorFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/SmsCommunicator/SmsCommunicatorFragment.java @@ -20,13 +20,14 @@ import java.util.Comparator; import info.nightscout.androidaps.MainApp; import info.nightscout.androidaps.R; +import info.nightscout.androidaps.plugins.Common.SubscriberFragment; import info.nightscout.androidaps.plugins.SmsCommunicator.events.EventSmsCommunicatorUpdateGui; import info.nightscout.utils.DateUtil; /** * A simple {@link Fragment} subclass. */ -public class SmsCommunicatorFragment extends Fragment { +public class SmsCommunicatorFragment extends SubscriberFragment { private static Logger log = LoggerFactory.getLogger(SmsCommunicatorFragment.class); private static SmsCommunicatorPlugin smsCommunicatorPlugin; @@ -56,25 +57,14 @@ public class SmsCommunicatorFragment extends Fragment { return view; } - @Override - public void onPause() { - super.onPause(); - MainApp.bus().unregister(this); - } - - @Override - public void onResume() { - super.onResume(); - MainApp.bus().register(this); - } - @Subscribe public void onStatusEvent(final EventSmsCommunicatorUpdateGui ev) { updateGUI(); } - private void updateGUI() { + @Override + protected void updateGUI() { Activity activity = getActivity(); if (activity != null) activity.runOnUiThread(new Runnable() { diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/Treatments/TreatmentsPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/Treatments/TreatmentsPlugin.java index 6a7f8c0873..8a999cbcd6 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/Treatments/TreatmentsPlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/Treatments/TreatmentsPlugin.java @@ -188,11 +188,13 @@ public class TreatmentsPlugin implements PluginBase, TreatmentsInterface { } if (!MainApp.getConfigBuilder().isFakingTempsByExtendedBoluses()) - for (Integer pos = 0; pos < extendedBoluses.size(); pos++) { - ExtendedBolus e = extendedBoluses.get(pos); - if (e.date > time) continue; - IobTotal calc = e.iobCalc(time); - total.plus(calc); + synchronized (extendedBoluses) { + for (Integer pos = 0; pos < extendedBoluses.size(); pos++) { + ExtendedBolus e = extendedBoluses.get(pos); + if (e.date > time) continue; + IobTotal calc = e.iobCalc(time); + total.plus(calc); + } } return total; } @@ -292,20 +294,24 @@ public class TreatmentsPlugin implements PluginBase, TreatmentsInterface { @Override public IobTotal getCalculationToTimeTempBasals(long time) { IobTotal total = new IobTotal(time); - for (Integer pos = 0; pos < tempBasals.size(); pos++) { - TemporaryBasal t = tempBasals.get(pos); - if (t.date > time) continue; - IobTotal calc = t.iobCalc(time); - //log.debug("BasalIOB " + new Date(time) + " >>> " + calc.basaliob); - total.plus(calc); + synchronized (tempBasals) { + for (Integer pos = 0; pos < tempBasals.size(); pos++) { + TemporaryBasal t = tempBasals.get(pos); + if (t.date > time) continue; + IobTotal calc = t.iobCalc(time); + //log.debug("BasalIOB " + new Date(time) + " >>> " + calc.basaliob); + total.plus(calc); + } } if (MainApp.getConfigBuilder().isFakingTempsByExtendedBoluses()) { IobTotal totalExt = new IobTotal(time); - for (Integer pos = 0; pos < extendedBoluses.size(); pos++) { - ExtendedBolus e = extendedBoluses.get(pos); - if (e.date > time) continue; - IobTotal calc = e.iobCalc(time); - totalExt.plus(calc); + synchronized (extendedBoluses) { + for (Integer pos = 0; pos < extendedBoluses.size(); pos++) { + ExtendedBolus e = extendedBoluses.get(pos); + if (e.date > time) continue; + IobTotal calc = e.iobCalc(time); + totalExt.plus(calc); + } } // Convert to basal iob totalExt.basaliob = totalExt.iob; @@ -420,12 +426,18 @@ public class TreatmentsPlugin implements PluginBase, TreatmentsInterface { @Override public long oldestDataAvailable() { long oldestTime = System.currentTimeMillis(); - if (tempBasals.size() > 0) - oldestTime = Math.min(oldestTime, tempBasals.get(0).date); - if (extendedBoluses.size() > 0) - oldestTime = Math.min(oldestTime, extendedBoluses.get(0).date); - if (treatments.size() > 0) - oldestTime = Math.min(oldestTime, treatments.get(treatments.size() - 1).date); + synchronized (tempBasals) { + if (tempBasals.size() > 0) + oldestTime = Math.min(oldestTime, tempBasals.get(0).date); + } + synchronized (extendedBoluses) { + if (extendedBoluses.size() > 0) + oldestTime = Math.min(oldestTime, extendedBoluses.get(0).date); + } + synchronized (treatments) { + if (treatments.size() > 0) + oldestTime = Math.min(oldestTime, treatments.get(treatments.size() - 1).date); + } oldestTime -= 15 * 60 * 1000L; // allow 15 min before return oldestTime; } diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/Treatments/fragments/TreatmentsBolusFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/Treatments/fragments/TreatmentsBolusFragment.java index c0e763ee90..0e7d94cd88 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/Treatments/fragments/TreatmentsBolusFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/Treatments/fragments/TreatmentsBolusFragment.java @@ -37,13 +37,14 @@ import info.nightscout.androidaps.db.Treatment; import info.nightscout.androidaps.events.EventNewBG; import info.nightscout.androidaps.events.EventTreatmentChange; import info.nightscout.androidaps.data.Profile; +import info.nightscout.androidaps.plugins.Common.SubscriberFragment; import info.nightscout.androidaps.plugins.Treatments.TreatmentsPlugin; import info.nightscout.utils.DateUtil; import info.nightscout.utils.DecimalFormatter; import info.nightscout.utils.NSUpload; import info.nightscout.utils.SP; -public class TreatmentsBolusFragment extends Fragment implements View.OnClickListener { +public class TreatmentsBolusFragment extends SubscriberFragment implements View.OnClickListener { private static Logger log = LoggerFactory.getLogger(TreatmentsBolusFragment.class); RecyclerView recyclerView; @@ -205,19 +206,6 @@ public class TreatmentsBolusFragment extends Fragment implements View.OnClickLis } } - @Override - public void onPause() { - super.onPause(); - MainApp.bus().unregister(this); - } - - @Override - public void onResume() { - super.onResume(); - MainApp.bus().register(this); - updateGUI(); - } - @Subscribe public void onStatusEvent(final EventTreatmentChange ev) { updateGUI(); @@ -228,7 +216,8 @@ public class TreatmentsBolusFragment extends Fragment implements View.OnClickLis updateGUI(); } - public void updateGUI() { + @Override + protected void updateGUI() { Activity activity = getActivity(); if (activity != null) activity.runOnUiThread(new Runnable() { diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/Treatments/fragments/TreatmentsExtendedBolusesFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/Treatments/fragments/TreatmentsExtendedBolusesFragment.java index ca1cb002f8..eb3bd49d89 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/Treatments/fragments/TreatmentsExtendedBolusesFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/Treatments/fragments/TreatmentsExtendedBolusesFragment.java @@ -30,13 +30,14 @@ import info.nightscout.androidaps.db.ExtendedBolus; import info.nightscout.androidaps.db.Source; import info.nightscout.androidaps.events.EventExtendedBolusChange; import info.nightscout.androidaps.events.EventNewBG; +import info.nightscout.androidaps.plugins.Common.SubscriberFragment; import info.nightscout.utils.DateUtil; import info.nightscout.utils.DecimalFormatter; import info.nightscout.utils.NSUpload; import info.nightscout.androidaps.data.Intervals; -public class TreatmentsExtendedBolusesFragment extends Fragment { +public class TreatmentsExtendedBolusesFragment extends SubscriberFragment { private static Logger log = LoggerFactory.getLogger(TreatmentsExtendedBolusesFragment.class); RecyclerView recyclerView; @@ -181,18 +182,6 @@ public class TreatmentsExtendedBolusesFragment extends Fragment { return view; } - @Override - public void onPause() { - super.onPause(); - MainApp.bus().unregister(this); - } - - @Override - public void onResume() { - super.onResume(); - MainApp.bus().register(this); - } - @Subscribe public void onStatusEvent(final EventExtendedBolusChange ev) { updateGUI(); @@ -203,7 +192,8 @@ public class TreatmentsExtendedBolusesFragment extends Fragment { updateGUI(); } - public void updateGUI() { + @Override + protected void updateGUI() { Activity activity = getActivity(); if (activity != null && recyclerView != null) activity.runOnUiThread(new Runnable() { diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/Treatments/fragments/TreatmentsProfileSwitchFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/Treatments/fragments/TreatmentsProfileSwitchFragment.java index 344abd8346..e5c1134787 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/Treatments/fragments/TreatmentsProfileSwitchFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/Treatments/fragments/TreatmentsProfileSwitchFragment.java @@ -30,6 +30,7 @@ import info.nightscout.androidaps.db.Source; import info.nightscout.androidaps.db.TempTarget; import info.nightscout.androidaps.events.EventProfileSwitchChange; import info.nightscout.androidaps.events.EventTempTargetChange; +import info.nightscout.androidaps.plugins.Common.SubscriberFragment; import info.nightscout.utils.DateUtil; import info.nightscout.utils.DecimalFormatter; import info.nightscout.utils.NSUpload; @@ -40,7 +41,7 @@ import info.nightscout.utils.SP; * Created by mike on 13/01/17. */ -public class TreatmentsProfileSwitchFragment extends Fragment implements View.OnClickListener { +public class TreatmentsProfileSwitchFragment extends SubscriberFragment implements View.OnClickListener { RecyclerView recyclerView; LinearLayoutManager llm; @@ -180,24 +181,13 @@ public class TreatmentsProfileSwitchFragment extends Fragment implements View.On } } - @Override - public void onPause() { - super.onPause(); - MainApp.bus().unregister(this); - } - - @Override - public void onResume() { - super.onResume(); - MainApp.bus().register(this); - } - @Subscribe public void onStatusEvent(final EventProfileSwitchChange ev) { updateGUI(); } - void updateGUI() { + @Override + protected void updateGUI() { Activity activity = getActivity(); if (activity != null) activity.runOnUiThread(new Runnable() { diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/Treatments/fragments/TreatmentsTempTargetFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/Treatments/fragments/TreatmentsTempTargetFragment.java index 2b3f310b38..008c82e612 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/Treatments/fragments/TreatmentsTempTargetFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/Treatments/fragments/TreatmentsTempTargetFragment.java @@ -26,6 +26,7 @@ import info.nightscout.androidaps.Services.Intents; import info.nightscout.androidaps.db.Source; import info.nightscout.androidaps.db.TempTarget; import info.nightscout.androidaps.events.EventTempTargetChange; +import info.nightscout.androidaps.plugins.Common.SubscriberFragment; import info.nightscout.utils.DateUtil; import info.nightscout.utils.DecimalFormatter; import info.nightscout.utils.NSUpload; @@ -36,7 +37,7 @@ import info.nightscout.utils.SP; * Created by mike on 13/01/17. */ -public class TreatmentsTempTargetFragment extends Fragment implements View.OnClickListener { +public class TreatmentsTempTargetFragment extends SubscriberFragment implements View.OnClickListener { RecyclerView recyclerView; LinearLayoutManager llm; @@ -210,24 +211,13 @@ public class TreatmentsTempTargetFragment extends Fragment implements View.OnCli } - @Override - public void onPause() { - super.onPause(); - MainApp.bus().unregister(this); - } - - @Override - public void onResume() { - super.onResume(); - MainApp.bus().register(this); - } - @Subscribe public void onStatusEvent(final EventTempTargetChange ev) { updateGUI(); } - void updateGUI() { + @Override + protected void updateGUI() { Activity activity = getActivity(); if (activity != null) activity.runOnUiThread(new Runnable() { diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/Treatments/fragments/TreatmentsTemporaryBasalsFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/Treatments/fragments/TreatmentsTemporaryBasalsFragment.java index 219e421c49..9127bf1e7a 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/Treatments/fragments/TreatmentsTemporaryBasalsFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/Treatments/fragments/TreatmentsTemporaryBasalsFragment.java @@ -30,13 +30,14 @@ import info.nightscout.androidaps.db.Source; import info.nightscout.androidaps.db.TemporaryBasal; import info.nightscout.androidaps.events.EventNewBG; import info.nightscout.androidaps.events.EventTempBasalChange; +import info.nightscout.androidaps.plugins.Common.SubscriberFragment; import info.nightscout.utils.DateUtil; import info.nightscout.utils.DecimalFormatter; import info.nightscout.utils.NSUpload; import info.nightscout.androidaps.data.Intervals; -public class TreatmentsTemporaryBasalsFragment extends Fragment { +public class TreatmentsTemporaryBasalsFragment extends SubscriberFragment { private static Logger log = LoggerFactory.getLogger(TreatmentsTemporaryBasalsFragment.class); RecyclerView recyclerView; @@ -200,18 +201,6 @@ public class TreatmentsTemporaryBasalsFragment extends Fragment { return view; } - @Override - public void onPause() { - super.onPause(); - MainApp.bus().unregister(this); - } - - @Override - public void onResume() { - super.onResume(); - MainApp.bus().register(this); - } - @Subscribe public void onStatusEvent(final EventTempBasalChange ev) { updateGUI(); @@ -222,7 +211,8 @@ public class TreatmentsTemporaryBasalsFragment extends Fragment { updateGUI(); } - public void updateGUI() { + @Override + protected void updateGUI() { Activity activity = getActivity(); if (activity != null) activity.runOnUiThread(new Runnable() { diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/Wear/ActionStringHandler.java b/app/src/main/java/info/nightscout/androidaps/plugins/Wear/ActionStringHandler.java index f800d9d531..02ee924923 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/Wear/ActionStringHandler.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/Wear/ActionStringHandler.java @@ -173,7 +173,7 @@ public class ActionStringHandler { rTitle += " LOOP"; rMessage = "TARGETS:\n" + getTargetsStatus(); rMessage += "\n\n" + getLoopStatus(); - rMessage += "\n\nOAPS RESULT:\n" + getOAPSResultStatus();; + rMessage += "\n\nOAPS RESULT:\n" + getOAPSResultStatus(); } } else if ("wizard".equals(act[0])) { diff --git a/app/src/main/res/drawable-hdpi/icon_actions_cancelextbolus.png b/app/src/main/res/drawable-hdpi/icon_actions_cancelextbolus.png new file mode 100644 index 0000000000..95761084a9 Binary files /dev/null and b/app/src/main/res/drawable-hdpi/icon_actions_cancelextbolus.png differ diff --git a/app/src/main/res/drawable-hdpi/icon_actions_profileswitch.png b/app/src/main/res/drawable-hdpi/icon_actions_profileswitch.png new file mode 100644 index 0000000000..4b36a0cc23 Binary files /dev/null and b/app/src/main/res/drawable-hdpi/icon_actions_profileswitch.png differ diff --git a/app/src/main/res/drawable-hdpi/icon_actions_refill.png b/app/src/main/res/drawable-hdpi/icon_actions_refill.png new file mode 100644 index 0000000000..ace25d1558 Binary files /dev/null and b/app/src/main/res/drawable-hdpi/icon_actions_refill.png differ diff --git a/app/src/main/res/drawable-hdpi/icon_actions_startextbolus.png b/app/src/main/res/drawable-hdpi/icon_actions_startextbolus.png new file mode 100644 index 0000000000..a67d52838c Binary files /dev/null and b/app/src/main/res/drawable-hdpi/icon_actions_startextbolus.png differ diff --git a/app/src/main/res/drawable-hdpi/icon_actions_starttempbasal.png b/app/src/main/res/drawable-hdpi/icon_actions_starttempbasal.png new file mode 100644 index 0000000000..8772df62a4 Binary files /dev/null and b/app/src/main/res/drawable-hdpi/icon_actions_starttempbasal.png differ diff --git a/app/src/main/res/drawable-hdpi/icon_actions_temptarget.png b/app/src/main/res/drawable-hdpi/icon_actions_temptarget.png new file mode 100644 index 0000000000..f839a6894b Binary files /dev/null and b/app/src/main/res/drawable-hdpi/icon_actions_temptarget.png differ diff --git a/app/src/main/res/drawable-hdpi/icon_cp_aaps_offline.png b/app/src/main/res/drawable-hdpi/icon_cp_aaps_offline.png new file mode 100644 index 0000000000..0fe1cd628b Binary files /dev/null and b/app/src/main/res/drawable-hdpi/icon_cp_aaps_offline.png differ diff --git a/app/src/main/res/drawable-hdpi/icon_cp_age_battery.png b/app/src/main/res/drawable-hdpi/icon_cp_age_battery.png new file mode 100644 index 0000000000..abc626901a Binary files /dev/null and b/app/src/main/res/drawable-hdpi/icon_cp_age_battery.png differ diff --git a/app/src/main/res/drawable-hdpi/icon_cp_age_canula.png b/app/src/main/res/drawable-hdpi/icon_cp_age_canula.png new file mode 100644 index 0000000000..ecccc39426 Binary files /dev/null and b/app/src/main/res/drawable-hdpi/icon_cp_age_canula.png differ diff --git a/app/src/main/res/drawable-hdpi/icon_cp_age_insulin.png b/app/src/main/res/drawable-hdpi/icon_cp_age_insulin.png new file mode 100644 index 0000000000..ab4d345881 Binary files /dev/null and b/app/src/main/res/drawable-hdpi/icon_cp_age_insulin.png differ diff --git a/app/src/main/res/drawable-hdpi/icon_cp_age_sensor.png b/app/src/main/res/drawable-hdpi/icon_cp_age_sensor.png new file mode 100644 index 0000000000..30d5d02de0 Binary files /dev/null and b/app/src/main/res/drawable-hdpi/icon_cp_age_sensor.png differ diff --git a/app/src/main/res/drawable-hdpi/icon_cp_announcement.png b/app/src/main/res/drawable-hdpi/icon_cp_announcement.png new file mode 100644 index 0000000000..23c9a9847d Binary files /dev/null and b/app/src/main/res/drawable-hdpi/icon_cp_announcement.png differ diff --git a/app/src/main/res/drawable-hdpi/icon_cp_basal_end.png b/app/src/main/res/drawable-hdpi/icon_cp_basal_end.png new file mode 100644 index 0000000000..b9cdf5cc1f Binary files /dev/null and b/app/src/main/res/drawable-hdpi/icon_cp_basal_end.png differ diff --git a/app/src/main/res/drawable-hdpi/icon_cp_basal_start.png b/app/src/main/res/drawable-hdpi/icon_cp_basal_start.png new file mode 100644 index 0000000000..d79ca15f86 Binary files /dev/null and b/app/src/main/res/drawable-hdpi/icon_cp_basal_start.png differ diff --git a/app/src/main/res/drawable-hdpi/icon_cp_bgcheck.png b/app/src/main/res/drawable-hdpi/icon_cp_bgcheck.png new file mode 100644 index 0000000000..56569a264a Binary files /dev/null and b/app/src/main/res/drawable-hdpi/icon_cp_bgcheck.png differ diff --git a/app/src/main/res/drawable-hdpi/icon_cp_bolus_carbs.png b/app/src/main/res/drawable-hdpi/icon_cp_bolus_carbs.png new file mode 100644 index 0000000000..ed6be099aa Binary files /dev/null and b/app/src/main/res/drawable-hdpi/icon_cp_bolus_carbs.png differ diff --git a/app/src/main/res/drawable-hdpi/icon_cp_bolus_combo.png b/app/src/main/res/drawable-hdpi/icon_cp_bolus_combo.png new file mode 100644 index 0000000000..98c076905c Binary files /dev/null and b/app/src/main/res/drawable-hdpi/icon_cp_bolus_combo.png differ diff --git a/app/src/main/res/drawable-hdpi/icon_cp_bolus_correction.png b/app/src/main/res/drawable-hdpi/icon_cp_bolus_correction.png new file mode 100644 index 0000000000..8ad7864406 Binary files /dev/null and b/app/src/main/res/drawable-hdpi/icon_cp_bolus_correction.png differ diff --git a/app/src/main/res/drawable-hdpi/icon_cp_bolus_meal.png b/app/src/main/res/drawable-hdpi/icon_cp_bolus_meal.png new file mode 100644 index 0000000000..97dd4e2ed8 Binary files /dev/null and b/app/src/main/res/drawable-hdpi/icon_cp_bolus_meal.png differ diff --git a/app/src/main/res/drawable-hdpi/icon_cp_bolus_snack.png b/app/src/main/res/drawable-hdpi/icon_cp_bolus_snack.png new file mode 100644 index 0000000000..710bf6e0da Binary files /dev/null and b/app/src/main/res/drawable-hdpi/icon_cp_bolus_snack.png differ diff --git a/app/src/main/res/drawable-hdpi/icon_cp_cgm_insert.png b/app/src/main/res/drawable-hdpi/icon_cp_cgm_insert.png new file mode 100644 index 0000000000..699be54792 Binary files /dev/null and b/app/src/main/res/drawable-hdpi/icon_cp_cgm_insert.png differ diff --git a/app/src/main/res/drawable-hdpi/icon_cp_cgm_profile.png b/app/src/main/res/drawable-hdpi/icon_cp_cgm_profile.png new file mode 100644 index 0000000000..8887e60f27 Binary files /dev/null and b/app/src/main/res/drawable-hdpi/icon_cp_cgm_profile.png differ diff --git a/app/src/main/res/drawable-hdpi/icon_cp_cgm_start.png b/app/src/main/res/drawable-hdpi/icon_cp_cgm_start.png new file mode 100644 index 0000000000..e917402c48 Binary files /dev/null and b/app/src/main/res/drawable-hdpi/icon_cp_cgm_start.png differ diff --git a/app/src/main/res/drawable-hdpi/icon_cp_cgm_target.png b/app/src/main/res/drawable-hdpi/icon_cp_cgm_target.png new file mode 100644 index 0000000000..2cf826dad1 Binary files /dev/null and b/app/src/main/res/drawable-hdpi/icon_cp_cgm_target.png differ diff --git a/app/src/main/res/drawable-hdpi/icon_cp_exercise.png b/app/src/main/res/drawable-hdpi/icon_cp_exercise.png new file mode 100644 index 0000000000..e9aee1ac8a Binary files /dev/null and b/app/src/main/res/drawable-hdpi/icon_cp_exercise.png differ diff --git a/app/src/main/res/drawable-hdpi/icon_cp_note.png b/app/src/main/res/drawable-hdpi/icon_cp_note.png new file mode 100644 index 0000000000..b6b752e150 Binary files /dev/null and b/app/src/main/res/drawable-hdpi/icon_cp_note.png differ diff --git a/app/src/main/res/drawable-hdpi/icon_cp_pump_battery.png b/app/src/main/res/drawable-hdpi/icon_cp_pump_battery.png new file mode 100644 index 0000000000..b4a4f2923a Binary files /dev/null and b/app/src/main/res/drawable-hdpi/icon_cp_pump_battery.png differ diff --git a/app/src/main/res/drawable-hdpi/icon_cp_pump_canula.png b/app/src/main/res/drawable-hdpi/icon_cp_pump_canula.png new file mode 100644 index 0000000000..e75d9ed81d Binary files /dev/null and b/app/src/main/res/drawable-hdpi/icon_cp_pump_canula.png differ diff --git a/app/src/main/res/drawable-hdpi/icon_cp_pump_cartridge.png b/app/src/main/res/drawable-hdpi/icon_cp_pump_cartridge.png new file mode 100644 index 0000000000..f780c23e37 Binary files /dev/null and b/app/src/main/res/drawable-hdpi/icon_cp_pump_cartridge.png differ diff --git a/app/src/main/res/drawable-hdpi/icon_cp_question.png b/app/src/main/res/drawable-hdpi/icon_cp_question.png new file mode 100644 index 0000000000..65102f2abf Binary files /dev/null and b/app/src/main/res/drawable-hdpi/icon_cp_question.png differ diff --git a/app/src/main/res/drawable-hdpi/icon_home_loop.png b/app/src/main/res/drawable-hdpi/icon_home_loop.png new file mode 100644 index 0000000000..b0f9f6ea29 Binary files /dev/null and b/app/src/main/res/drawable-hdpi/icon_home_loop.png differ diff --git a/app/src/main/res/drawable-hdpi/icon_home_profile.png b/app/src/main/res/drawable-hdpi/icon_home_profile.png new file mode 100644 index 0000000000..b288171332 Binary files /dev/null and b/app/src/main/res/drawable-hdpi/icon_home_profile.png differ diff --git a/app/src/main/res/drawable-hdpi/icon_home_target.png b/app/src/main/res/drawable-hdpi/icon_home_target.png new file mode 100644 index 0000000000..0b2f2b166a Binary files /dev/null and b/app/src/main/res/drawable-hdpi/icon_home_target.png differ diff --git a/app/src/main/res/drawable-mdpi/icon_actions_cancelextbolus.png b/app/src/main/res/drawable-mdpi/icon_actions_cancelextbolus.png new file mode 100644 index 0000000000..4ad378e374 Binary files /dev/null and b/app/src/main/res/drawable-mdpi/icon_actions_cancelextbolus.png differ diff --git a/app/src/main/res/drawable-mdpi/icon_actions_profileswitch.png b/app/src/main/res/drawable-mdpi/icon_actions_profileswitch.png new file mode 100644 index 0000000000..eeae6ccfdb Binary files /dev/null and b/app/src/main/res/drawable-mdpi/icon_actions_profileswitch.png differ diff --git a/app/src/main/res/drawable-mdpi/icon_actions_refill.png b/app/src/main/res/drawable-mdpi/icon_actions_refill.png new file mode 100644 index 0000000000..737cca8b00 Binary files /dev/null and b/app/src/main/res/drawable-mdpi/icon_actions_refill.png differ diff --git a/app/src/main/res/drawable-mdpi/icon_actions_startextbolus.png b/app/src/main/res/drawable-mdpi/icon_actions_startextbolus.png new file mode 100644 index 0000000000..338df773c2 Binary files /dev/null and b/app/src/main/res/drawable-mdpi/icon_actions_startextbolus.png differ diff --git a/app/src/main/res/drawable-mdpi/icon_actions_starttempbasal.png b/app/src/main/res/drawable-mdpi/icon_actions_starttempbasal.png new file mode 100644 index 0000000000..18fbd8c111 Binary files /dev/null and b/app/src/main/res/drawable-mdpi/icon_actions_starttempbasal.png differ diff --git a/app/src/main/res/drawable-mdpi/icon_actions_temptarget.png b/app/src/main/res/drawable-mdpi/icon_actions_temptarget.png new file mode 100644 index 0000000000..39170bab37 Binary files /dev/null and b/app/src/main/res/drawable-mdpi/icon_actions_temptarget.png differ diff --git a/app/src/main/res/drawable-mdpi/icon_cp_aaps_offline.png b/app/src/main/res/drawable-mdpi/icon_cp_aaps_offline.png new file mode 100644 index 0000000000..dc50653883 Binary files /dev/null and b/app/src/main/res/drawable-mdpi/icon_cp_aaps_offline.png differ diff --git a/app/src/main/res/drawable-mdpi/icon_cp_age_battery.png b/app/src/main/res/drawable-mdpi/icon_cp_age_battery.png new file mode 100644 index 0000000000..6c7fc56139 Binary files /dev/null and b/app/src/main/res/drawable-mdpi/icon_cp_age_battery.png differ diff --git a/app/src/main/res/drawable-mdpi/icon_cp_age_canula.png b/app/src/main/res/drawable-mdpi/icon_cp_age_canula.png new file mode 100644 index 0000000000..303ad946cd Binary files /dev/null and b/app/src/main/res/drawable-mdpi/icon_cp_age_canula.png differ diff --git a/app/src/main/res/drawable-mdpi/icon_cp_age_insulin.png b/app/src/main/res/drawable-mdpi/icon_cp_age_insulin.png new file mode 100644 index 0000000000..5cd8598faa Binary files /dev/null and b/app/src/main/res/drawable-mdpi/icon_cp_age_insulin.png differ diff --git a/app/src/main/res/drawable-mdpi/icon_cp_age_sensor.png b/app/src/main/res/drawable-mdpi/icon_cp_age_sensor.png new file mode 100644 index 0000000000..d312b6c572 Binary files /dev/null and b/app/src/main/res/drawable-mdpi/icon_cp_age_sensor.png differ diff --git a/app/src/main/res/drawable-mdpi/icon_cp_announcement.png b/app/src/main/res/drawable-mdpi/icon_cp_announcement.png new file mode 100644 index 0000000000..6e1338ac24 Binary files /dev/null and b/app/src/main/res/drawable-mdpi/icon_cp_announcement.png differ diff --git a/app/src/main/res/drawable-mdpi/icon_cp_basal_end.png b/app/src/main/res/drawable-mdpi/icon_cp_basal_end.png new file mode 100644 index 0000000000..be8474f002 Binary files /dev/null and b/app/src/main/res/drawable-mdpi/icon_cp_basal_end.png differ diff --git a/app/src/main/res/drawable-mdpi/icon_cp_basal_start.png b/app/src/main/res/drawable-mdpi/icon_cp_basal_start.png new file mode 100644 index 0000000000..34cd31f14b Binary files /dev/null and b/app/src/main/res/drawable-mdpi/icon_cp_basal_start.png differ diff --git a/app/src/main/res/drawable-mdpi/icon_cp_bgcheck.png b/app/src/main/res/drawable-mdpi/icon_cp_bgcheck.png new file mode 100644 index 0000000000..0cb14c2f57 Binary files /dev/null and b/app/src/main/res/drawable-mdpi/icon_cp_bgcheck.png differ diff --git a/app/src/main/res/drawable-mdpi/icon_cp_bolus_carbs.png b/app/src/main/res/drawable-mdpi/icon_cp_bolus_carbs.png new file mode 100644 index 0000000000..561703fb06 Binary files /dev/null and b/app/src/main/res/drawable-mdpi/icon_cp_bolus_carbs.png differ diff --git a/app/src/main/res/drawable-mdpi/icon_cp_bolus_combo.png b/app/src/main/res/drawable-mdpi/icon_cp_bolus_combo.png new file mode 100644 index 0000000000..ce4d8fb9d3 Binary files /dev/null and b/app/src/main/res/drawable-mdpi/icon_cp_bolus_combo.png differ diff --git a/app/src/main/res/drawable-mdpi/icon_cp_bolus_correction.png b/app/src/main/res/drawable-mdpi/icon_cp_bolus_correction.png new file mode 100644 index 0000000000..582472dc92 Binary files /dev/null and b/app/src/main/res/drawable-mdpi/icon_cp_bolus_correction.png differ diff --git a/app/src/main/res/drawable-mdpi/icon_cp_bolus_meal.png b/app/src/main/res/drawable-mdpi/icon_cp_bolus_meal.png new file mode 100644 index 0000000000..54b51e126e Binary files /dev/null and b/app/src/main/res/drawable-mdpi/icon_cp_bolus_meal.png differ diff --git a/app/src/main/res/drawable-mdpi/icon_cp_bolus_snack.png b/app/src/main/res/drawable-mdpi/icon_cp_bolus_snack.png new file mode 100644 index 0000000000..b2ba41c27d Binary files /dev/null and b/app/src/main/res/drawable-mdpi/icon_cp_bolus_snack.png differ diff --git a/app/src/main/res/drawable-mdpi/icon_cp_cgm_insert.png b/app/src/main/res/drawable-mdpi/icon_cp_cgm_insert.png new file mode 100644 index 0000000000..67c0fb1ba2 Binary files /dev/null and b/app/src/main/res/drawable-mdpi/icon_cp_cgm_insert.png differ diff --git a/app/src/main/res/drawable-mdpi/icon_cp_cgm_profile.png b/app/src/main/res/drawable-mdpi/icon_cp_cgm_profile.png new file mode 100644 index 0000000000..e0f0a15cc8 Binary files /dev/null and b/app/src/main/res/drawable-mdpi/icon_cp_cgm_profile.png differ diff --git a/app/src/main/res/drawable-mdpi/icon_cp_cgm_start.png b/app/src/main/res/drawable-mdpi/icon_cp_cgm_start.png new file mode 100644 index 0000000000..14a44bc852 Binary files /dev/null and b/app/src/main/res/drawable-mdpi/icon_cp_cgm_start.png differ diff --git a/app/src/main/res/drawable-mdpi/icon_cp_cgm_target.png b/app/src/main/res/drawable-mdpi/icon_cp_cgm_target.png new file mode 100644 index 0000000000..86ce00442c Binary files /dev/null and b/app/src/main/res/drawable-mdpi/icon_cp_cgm_target.png differ diff --git a/app/src/main/res/drawable-mdpi/icon_cp_exercise.png b/app/src/main/res/drawable-mdpi/icon_cp_exercise.png new file mode 100644 index 0000000000..1c92c0ebb5 Binary files /dev/null and b/app/src/main/res/drawable-mdpi/icon_cp_exercise.png differ diff --git a/app/src/main/res/drawable-mdpi/icon_cp_note.png b/app/src/main/res/drawable-mdpi/icon_cp_note.png new file mode 100644 index 0000000000..7c8663a4fe Binary files /dev/null and b/app/src/main/res/drawable-mdpi/icon_cp_note.png differ diff --git a/app/src/main/res/drawable-mdpi/icon_cp_pump_battery.png b/app/src/main/res/drawable-mdpi/icon_cp_pump_battery.png new file mode 100644 index 0000000000..f4dab169a8 Binary files /dev/null and b/app/src/main/res/drawable-mdpi/icon_cp_pump_battery.png differ diff --git a/app/src/main/res/drawable-mdpi/icon_cp_pump_canula.png b/app/src/main/res/drawable-mdpi/icon_cp_pump_canula.png new file mode 100644 index 0000000000..ee512c5fef Binary files /dev/null and b/app/src/main/res/drawable-mdpi/icon_cp_pump_canula.png differ diff --git a/app/src/main/res/drawable-mdpi/icon_cp_pump_cartridge.png b/app/src/main/res/drawable-mdpi/icon_cp_pump_cartridge.png new file mode 100644 index 0000000000..70a90c596f Binary files /dev/null and b/app/src/main/res/drawable-mdpi/icon_cp_pump_cartridge.png differ diff --git a/app/src/main/res/drawable-mdpi/icon_cp_question.png b/app/src/main/res/drawable-mdpi/icon_cp_question.png new file mode 100644 index 0000000000..5d430d9164 Binary files /dev/null and b/app/src/main/res/drawable-mdpi/icon_cp_question.png differ diff --git a/app/src/main/res/drawable-mdpi/icon_home_loop.png b/app/src/main/res/drawable-mdpi/icon_home_loop.png new file mode 100644 index 0000000000..5240cc85db Binary files /dev/null and b/app/src/main/res/drawable-mdpi/icon_home_loop.png differ diff --git a/app/src/main/res/drawable-mdpi/icon_home_profile.png b/app/src/main/res/drawable-mdpi/icon_home_profile.png new file mode 100644 index 0000000000..f689df10c6 Binary files /dev/null and b/app/src/main/res/drawable-mdpi/icon_home_profile.png differ diff --git a/app/src/main/res/drawable-mdpi/icon_home_target.png b/app/src/main/res/drawable-mdpi/icon_home_target.png new file mode 100644 index 0000000000..9fc7086e9d Binary files /dev/null and b/app/src/main/res/drawable-mdpi/icon_home_target.png differ diff --git a/app/src/main/res/drawable-xhdpi/icon_actions_cancelextbolus.png b/app/src/main/res/drawable-xhdpi/icon_actions_cancelextbolus.png new file mode 100644 index 0000000000..8c4ee82d1e Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/icon_actions_cancelextbolus.png differ diff --git a/app/src/main/res/drawable-xhdpi/icon_actions_profileswitch.png b/app/src/main/res/drawable-xhdpi/icon_actions_profileswitch.png new file mode 100644 index 0000000000..57864f6ed5 Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/icon_actions_profileswitch.png differ diff --git a/app/src/main/res/drawable-xhdpi/icon_actions_refill.png b/app/src/main/res/drawable-xhdpi/icon_actions_refill.png new file mode 100644 index 0000000000..ace20f3bfe Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/icon_actions_refill.png differ diff --git a/app/src/main/res/drawable-xhdpi/icon_actions_startextbolus.png b/app/src/main/res/drawable-xhdpi/icon_actions_startextbolus.png new file mode 100644 index 0000000000..0e59f6ec36 Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/icon_actions_startextbolus.png differ diff --git a/app/src/main/res/drawable-xhdpi/icon_actions_starttempbasal.png b/app/src/main/res/drawable-xhdpi/icon_actions_starttempbasal.png new file mode 100644 index 0000000000..1deb6f3ca8 Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/icon_actions_starttempbasal.png differ diff --git a/app/src/main/res/drawable-xhdpi/icon_actions_temptarget.png b/app/src/main/res/drawable-xhdpi/icon_actions_temptarget.png new file mode 100644 index 0000000000..c484837e53 Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/icon_actions_temptarget.png differ diff --git a/app/src/main/res/drawable-xhdpi/icon_cp_aaps_offline.png b/app/src/main/res/drawable-xhdpi/icon_cp_aaps_offline.png new file mode 100644 index 0000000000..4239e40ba7 Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/icon_cp_aaps_offline.png differ diff --git a/app/src/main/res/drawable-xhdpi/icon_cp_age_battery.png b/app/src/main/res/drawable-xhdpi/icon_cp_age_battery.png new file mode 100644 index 0000000000..3d75b9dc7a Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/icon_cp_age_battery.png differ diff --git a/app/src/main/res/drawable-xhdpi/icon_cp_age_canula.png b/app/src/main/res/drawable-xhdpi/icon_cp_age_canula.png new file mode 100644 index 0000000000..8629a7998d Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/icon_cp_age_canula.png differ diff --git a/app/src/main/res/drawable-xhdpi/icon_cp_age_insulin.png b/app/src/main/res/drawable-xhdpi/icon_cp_age_insulin.png new file mode 100644 index 0000000000..2e88ec9ad4 Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/icon_cp_age_insulin.png differ diff --git a/app/src/main/res/drawable-xhdpi/icon_cp_age_sensor.png b/app/src/main/res/drawable-xhdpi/icon_cp_age_sensor.png new file mode 100644 index 0000000000..a3577da118 Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/icon_cp_age_sensor.png differ diff --git a/app/src/main/res/drawable-xhdpi/icon_cp_announcement.png b/app/src/main/res/drawable-xhdpi/icon_cp_announcement.png new file mode 100644 index 0000000000..472b51d775 Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/icon_cp_announcement.png differ diff --git a/app/src/main/res/drawable-xhdpi/icon_cp_basal_end.png b/app/src/main/res/drawable-xhdpi/icon_cp_basal_end.png new file mode 100644 index 0000000000..c92af22df3 Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/icon_cp_basal_end.png differ diff --git a/app/src/main/res/drawable-xhdpi/icon_cp_basal_start.png b/app/src/main/res/drawable-xhdpi/icon_cp_basal_start.png new file mode 100644 index 0000000000..5e694ba89c Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/icon_cp_basal_start.png differ diff --git a/app/src/main/res/drawable-xhdpi/icon_cp_bgcheck.png b/app/src/main/res/drawable-xhdpi/icon_cp_bgcheck.png new file mode 100644 index 0000000000..030099f910 Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/icon_cp_bgcheck.png differ diff --git a/app/src/main/res/drawable-xhdpi/icon_cp_bolus_carbs.png b/app/src/main/res/drawable-xhdpi/icon_cp_bolus_carbs.png new file mode 100644 index 0000000000..64815bc8f0 Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/icon_cp_bolus_carbs.png differ diff --git a/app/src/main/res/drawable-xhdpi/icon_cp_bolus_combo.png b/app/src/main/res/drawable-xhdpi/icon_cp_bolus_combo.png new file mode 100644 index 0000000000..908f33ccd8 Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/icon_cp_bolus_combo.png differ diff --git a/app/src/main/res/drawable-xhdpi/icon_cp_bolus_correction.png b/app/src/main/res/drawable-xhdpi/icon_cp_bolus_correction.png new file mode 100644 index 0000000000..0fe89d5f8b Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/icon_cp_bolus_correction.png differ diff --git a/app/src/main/res/drawable-xhdpi/icon_cp_bolus_meal.png b/app/src/main/res/drawable-xhdpi/icon_cp_bolus_meal.png new file mode 100644 index 0000000000..52ef734adf Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/icon_cp_bolus_meal.png differ diff --git a/app/src/main/res/drawable-xhdpi/icon_cp_bolus_snack.png b/app/src/main/res/drawable-xhdpi/icon_cp_bolus_snack.png new file mode 100644 index 0000000000..8d2e9690fc Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/icon_cp_bolus_snack.png differ diff --git a/app/src/main/res/drawable-xhdpi/icon_cp_cgm_insert.png b/app/src/main/res/drawable-xhdpi/icon_cp_cgm_insert.png new file mode 100644 index 0000000000..af93321e3a Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/icon_cp_cgm_insert.png differ diff --git a/app/src/main/res/drawable-xhdpi/icon_cp_cgm_profile.png b/app/src/main/res/drawable-xhdpi/icon_cp_cgm_profile.png new file mode 100644 index 0000000000..e4c50f2667 Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/icon_cp_cgm_profile.png differ diff --git a/app/src/main/res/drawable-xhdpi/icon_cp_cgm_start.png b/app/src/main/res/drawable-xhdpi/icon_cp_cgm_start.png new file mode 100644 index 0000000000..ce23d1cf54 Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/icon_cp_cgm_start.png differ diff --git a/app/src/main/res/drawable-xhdpi/icon_cp_cgm_target.png b/app/src/main/res/drawable-xhdpi/icon_cp_cgm_target.png new file mode 100644 index 0000000000..fbd5880490 Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/icon_cp_cgm_target.png differ diff --git a/app/src/main/res/drawable-xhdpi/icon_cp_exercise.png b/app/src/main/res/drawable-xhdpi/icon_cp_exercise.png new file mode 100644 index 0000000000..90cc102c07 Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/icon_cp_exercise.png differ diff --git a/app/src/main/res/drawable-xhdpi/icon_cp_note.png b/app/src/main/res/drawable-xhdpi/icon_cp_note.png new file mode 100644 index 0000000000..cf821a9d1f Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/icon_cp_note.png differ diff --git a/app/src/main/res/drawable-xhdpi/icon_cp_pump_battery.png b/app/src/main/res/drawable-xhdpi/icon_cp_pump_battery.png new file mode 100644 index 0000000000..15af2af396 Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/icon_cp_pump_battery.png differ diff --git a/app/src/main/res/drawable-xhdpi/icon_cp_pump_canula.png b/app/src/main/res/drawable-xhdpi/icon_cp_pump_canula.png new file mode 100644 index 0000000000..84ae19c4a3 Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/icon_cp_pump_canula.png differ diff --git a/app/src/main/res/drawable-xhdpi/icon_cp_pump_cartridge.png b/app/src/main/res/drawable-xhdpi/icon_cp_pump_cartridge.png new file mode 100644 index 0000000000..d40a8540e6 Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/icon_cp_pump_cartridge.png differ diff --git a/app/src/main/res/drawable-xhdpi/icon_cp_question.png b/app/src/main/res/drawable-xhdpi/icon_cp_question.png new file mode 100644 index 0000000000..43df04ef81 Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/icon_cp_question.png differ diff --git a/app/src/main/res/drawable-xhdpi/icon_home_loop.png b/app/src/main/res/drawable-xhdpi/icon_home_loop.png new file mode 100644 index 0000000000..09ebbed57f Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/icon_home_loop.png differ diff --git a/app/src/main/res/drawable-xhdpi/icon_home_profile.png b/app/src/main/res/drawable-xhdpi/icon_home_profile.png new file mode 100644 index 0000000000..95c0ca4502 Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/icon_home_profile.png differ diff --git a/app/src/main/res/drawable-xhdpi/icon_home_target.png b/app/src/main/res/drawable-xhdpi/icon_home_target.png new file mode 100644 index 0000000000..545ff5db79 Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/icon_home_target.png differ diff --git a/app/src/main/res/drawable-xxhdpi/icon_actions_cancelextbolus.png b/app/src/main/res/drawable-xxhdpi/icon_actions_cancelextbolus.png new file mode 100644 index 0000000000..d223d16d8f Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/icon_actions_cancelextbolus.png differ diff --git a/app/src/main/res/drawable-xxhdpi/icon_actions_profileswitch.png b/app/src/main/res/drawable-xxhdpi/icon_actions_profileswitch.png new file mode 100644 index 0000000000..29e28afe02 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/icon_actions_profileswitch.png differ diff --git a/app/src/main/res/drawable-xxhdpi/icon_actions_refill.png b/app/src/main/res/drawable-xxhdpi/icon_actions_refill.png new file mode 100644 index 0000000000..45cc5d3e1a Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/icon_actions_refill.png differ diff --git a/app/src/main/res/drawable-xxhdpi/icon_actions_startextbolus.png b/app/src/main/res/drawable-xxhdpi/icon_actions_startextbolus.png new file mode 100644 index 0000000000..e33b5e0a64 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/icon_actions_startextbolus.png differ diff --git a/app/src/main/res/drawable-xxhdpi/icon_actions_starttempbasal.png b/app/src/main/res/drawable-xxhdpi/icon_actions_starttempbasal.png new file mode 100644 index 0000000000..9e4aca67e2 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/icon_actions_starttempbasal.png differ diff --git a/app/src/main/res/drawable-xxhdpi/icon_actions_temptarget.png b/app/src/main/res/drawable-xxhdpi/icon_actions_temptarget.png new file mode 100644 index 0000000000..4fa88421ae Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/icon_actions_temptarget.png differ diff --git a/app/src/main/res/drawable-xxhdpi/icon_cp_aaps_offline.png b/app/src/main/res/drawable-xxhdpi/icon_cp_aaps_offline.png new file mode 100644 index 0000000000..1b4603bafc Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/icon_cp_aaps_offline.png differ diff --git a/app/src/main/res/drawable-xxhdpi/icon_cp_age_battery.png b/app/src/main/res/drawable-xxhdpi/icon_cp_age_battery.png new file mode 100644 index 0000000000..d32a7791e1 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/icon_cp_age_battery.png differ diff --git a/app/src/main/res/drawable-xxhdpi/icon_cp_age_canula.png b/app/src/main/res/drawable-xxhdpi/icon_cp_age_canula.png new file mode 100644 index 0000000000..715682129b Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/icon_cp_age_canula.png differ diff --git a/app/src/main/res/drawable-xxhdpi/icon_cp_age_insulin.png b/app/src/main/res/drawable-xxhdpi/icon_cp_age_insulin.png new file mode 100644 index 0000000000..79a21cea45 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/icon_cp_age_insulin.png differ diff --git a/app/src/main/res/drawable-xxhdpi/icon_cp_age_sensor.png b/app/src/main/res/drawable-xxhdpi/icon_cp_age_sensor.png new file mode 100644 index 0000000000..bb269c3af9 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/icon_cp_age_sensor.png differ diff --git a/app/src/main/res/drawable-xxhdpi/icon_cp_announcement.png b/app/src/main/res/drawable-xxhdpi/icon_cp_announcement.png new file mode 100644 index 0000000000..e287fa15d4 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/icon_cp_announcement.png differ diff --git a/app/src/main/res/drawable-xxhdpi/icon_cp_basal_end.png b/app/src/main/res/drawable-xxhdpi/icon_cp_basal_end.png new file mode 100644 index 0000000000..08acae3012 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/icon_cp_basal_end.png differ diff --git a/app/src/main/res/drawable-xxhdpi/icon_cp_basal_start.png b/app/src/main/res/drawable-xxhdpi/icon_cp_basal_start.png new file mode 100644 index 0000000000..1b6d970b95 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/icon_cp_basal_start.png differ diff --git a/app/src/main/res/drawable-xxhdpi/icon_cp_bgcheck.png b/app/src/main/res/drawable-xxhdpi/icon_cp_bgcheck.png new file mode 100644 index 0000000000..4e68c25d70 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/icon_cp_bgcheck.png differ diff --git a/app/src/main/res/drawable-xxhdpi/icon_cp_bolus_carbs.png b/app/src/main/res/drawable-xxhdpi/icon_cp_bolus_carbs.png new file mode 100644 index 0000000000..a110276120 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/icon_cp_bolus_carbs.png differ diff --git a/app/src/main/res/drawable-xxhdpi/icon_cp_bolus_combo.png b/app/src/main/res/drawable-xxhdpi/icon_cp_bolus_combo.png new file mode 100644 index 0000000000..c91b515001 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/icon_cp_bolus_combo.png differ diff --git a/app/src/main/res/drawable-xxhdpi/icon_cp_bolus_correction.png b/app/src/main/res/drawable-xxhdpi/icon_cp_bolus_correction.png new file mode 100644 index 0000000000..d0c7a40613 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/icon_cp_bolus_correction.png differ diff --git a/app/src/main/res/drawable-xxhdpi/icon_cp_bolus_meal.png b/app/src/main/res/drawable-xxhdpi/icon_cp_bolus_meal.png new file mode 100644 index 0000000000..e13a420bad Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/icon_cp_bolus_meal.png differ diff --git a/app/src/main/res/drawable-xxhdpi/icon_cp_bolus_snack.png b/app/src/main/res/drawable-xxhdpi/icon_cp_bolus_snack.png new file mode 100644 index 0000000000..6a9fb42088 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/icon_cp_bolus_snack.png differ diff --git a/app/src/main/res/drawable-xxhdpi/icon_cp_cgm_insert.png b/app/src/main/res/drawable-xxhdpi/icon_cp_cgm_insert.png new file mode 100644 index 0000000000..f1a791b702 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/icon_cp_cgm_insert.png differ diff --git a/app/src/main/res/drawable-xxhdpi/icon_cp_cgm_profile.png b/app/src/main/res/drawable-xxhdpi/icon_cp_cgm_profile.png new file mode 100644 index 0000000000..d40cba3c46 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/icon_cp_cgm_profile.png differ diff --git a/app/src/main/res/drawable-xxhdpi/icon_cp_cgm_start.png b/app/src/main/res/drawable-xxhdpi/icon_cp_cgm_start.png new file mode 100644 index 0000000000..47d5de66a1 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/icon_cp_cgm_start.png differ diff --git a/app/src/main/res/drawable-xxhdpi/icon_cp_cgm_target.png b/app/src/main/res/drawable-xxhdpi/icon_cp_cgm_target.png new file mode 100644 index 0000000000..13fc303aa2 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/icon_cp_cgm_target.png differ diff --git a/app/src/main/res/drawable-xxhdpi/icon_cp_exercise.png b/app/src/main/res/drawable-xxhdpi/icon_cp_exercise.png new file mode 100644 index 0000000000..4fb54d3703 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/icon_cp_exercise.png differ diff --git a/app/src/main/res/drawable-xxhdpi/icon_cp_note.png b/app/src/main/res/drawable-xxhdpi/icon_cp_note.png new file mode 100644 index 0000000000..c1881112b7 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/icon_cp_note.png differ diff --git a/app/src/main/res/drawable-xxhdpi/icon_cp_pump_battery.png b/app/src/main/res/drawable-xxhdpi/icon_cp_pump_battery.png new file mode 100644 index 0000000000..1a6d44bba0 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/icon_cp_pump_battery.png differ diff --git a/app/src/main/res/drawable-xxhdpi/icon_cp_pump_canula.png b/app/src/main/res/drawable-xxhdpi/icon_cp_pump_canula.png new file mode 100644 index 0000000000..6021f928ed Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/icon_cp_pump_canula.png differ diff --git a/app/src/main/res/drawable-xxhdpi/icon_cp_pump_cartridge.png b/app/src/main/res/drawable-xxhdpi/icon_cp_pump_cartridge.png new file mode 100644 index 0000000000..c7a8897a52 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/icon_cp_pump_cartridge.png differ diff --git a/app/src/main/res/drawable-xxhdpi/icon_cp_question.png b/app/src/main/res/drawable-xxhdpi/icon_cp_question.png new file mode 100644 index 0000000000..09455d09fd Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/icon_cp_question.png differ diff --git a/app/src/main/res/drawable-xxhdpi/icon_home_loop.png b/app/src/main/res/drawable-xxhdpi/icon_home_loop.png new file mode 100644 index 0000000000..c33f090311 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/icon_home_loop.png differ diff --git a/app/src/main/res/drawable-xxhdpi/icon_home_profile.png b/app/src/main/res/drawable-xxhdpi/icon_home_profile.png new file mode 100644 index 0000000000..00c4de023a Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/icon_home_profile.png differ diff --git a/app/src/main/res/drawable-xxhdpi/icon_home_target.png b/app/src/main/res/drawable-xxhdpi/icon_home_target.png new file mode 100644 index 0000000000..70fd9ebc27 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/icon_home_target.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/icon_actions_cancelextbolus.png b/app/src/main/res/drawable-xxxhdpi/icon_actions_cancelextbolus.png new file mode 100644 index 0000000000..f5b57a9bc9 Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/icon_actions_cancelextbolus.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/icon_actions_profileswitch.png b/app/src/main/res/drawable-xxxhdpi/icon_actions_profileswitch.png new file mode 100644 index 0000000000..d5631ef3ae Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/icon_actions_profileswitch.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/icon_actions_refill.png b/app/src/main/res/drawable-xxxhdpi/icon_actions_refill.png new file mode 100644 index 0000000000..be3a5db708 Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/icon_actions_refill.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/icon_actions_startextbolus.png b/app/src/main/res/drawable-xxxhdpi/icon_actions_startextbolus.png new file mode 100644 index 0000000000..89b44ea201 Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/icon_actions_startextbolus.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/icon_actions_starttempbasal.png b/app/src/main/res/drawable-xxxhdpi/icon_actions_starttempbasal.png new file mode 100644 index 0000000000..7be2e32dfe Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/icon_actions_starttempbasal.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/icon_actions_temptarget.png b/app/src/main/res/drawable-xxxhdpi/icon_actions_temptarget.png new file mode 100644 index 0000000000..955a19f3bc Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/icon_actions_temptarget.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/icon_cp_aaps_offline.png b/app/src/main/res/drawable-xxxhdpi/icon_cp_aaps_offline.png new file mode 100644 index 0000000000..3da8775fb4 Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/icon_cp_aaps_offline.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/icon_cp_age_battery.png b/app/src/main/res/drawable-xxxhdpi/icon_cp_age_battery.png new file mode 100644 index 0000000000..dd21ad490c Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/icon_cp_age_battery.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/icon_cp_age_canula.png b/app/src/main/res/drawable-xxxhdpi/icon_cp_age_canula.png new file mode 100644 index 0000000000..6a3585b72f Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/icon_cp_age_canula.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/icon_cp_age_insulin.png b/app/src/main/res/drawable-xxxhdpi/icon_cp_age_insulin.png new file mode 100644 index 0000000000..3b50b616fc Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/icon_cp_age_insulin.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/icon_cp_age_sensor.png b/app/src/main/res/drawable-xxxhdpi/icon_cp_age_sensor.png new file mode 100644 index 0000000000..2dd35e6e9e Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/icon_cp_age_sensor.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/icon_cp_announcement.png b/app/src/main/res/drawable-xxxhdpi/icon_cp_announcement.png new file mode 100644 index 0000000000..256631f49b Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/icon_cp_announcement.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/icon_cp_basal_end.png b/app/src/main/res/drawable-xxxhdpi/icon_cp_basal_end.png new file mode 100644 index 0000000000..a57ceb3b8a Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/icon_cp_basal_end.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/icon_cp_basal_start.png b/app/src/main/res/drawable-xxxhdpi/icon_cp_basal_start.png new file mode 100644 index 0000000000..d36b0b711c Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/icon_cp_basal_start.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/icon_cp_bgcheck.png b/app/src/main/res/drawable-xxxhdpi/icon_cp_bgcheck.png new file mode 100644 index 0000000000..fa72b549a9 Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/icon_cp_bgcheck.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/icon_cp_bolus_carbs.png b/app/src/main/res/drawable-xxxhdpi/icon_cp_bolus_carbs.png new file mode 100644 index 0000000000..4dab75558b Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/icon_cp_bolus_carbs.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/icon_cp_bolus_combo.png b/app/src/main/res/drawable-xxxhdpi/icon_cp_bolus_combo.png new file mode 100644 index 0000000000..1418ea4994 Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/icon_cp_bolus_combo.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/icon_cp_bolus_correction.png b/app/src/main/res/drawable-xxxhdpi/icon_cp_bolus_correction.png new file mode 100644 index 0000000000..ccc3d0e39c Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/icon_cp_bolus_correction.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/icon_cp_bolus_meal.png b/app/src/main/res/drawable-xxxhdpi/icon_cp_bolus_meal.png new file mode 100644 index 0000000000..aa7bdf7fe3 Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/icon_cp_bolus_meal.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/icon_cp_bolus_snack.png b/app/src/main/res/drawable-xxxhdpi/icon_cp_bolus_snack.png new file mode 100644 index 0000000000..1f9ab1697d Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/icon_cp_bolus_snack.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/icon_cp_cgm_insert.png b/app/src/main/res/drawable-xxxhdpi/icon_cp_cgm_insert.png new file mode 100644 index 0000000000..2d7e6b4542 Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/icon_cp_cgm_insert.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/icon_cp_cgm_profile.png b/app/src/main/res/drawable-xxxhdpi/icon_cp_cgm_profile.png new file mode 100644 index 0000000000..e8b4668b86 Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/icon_cp_cgm_profile.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/icon_cp_cgm_start.png b/app/src/main/res/drawable-xxxhdpi/icon_cp_cgm_start.png new file mode 100644 index 0000000000..e8d0e6773e Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/icon_cp_cgm_start.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/icon_cp_cgm_target.png b/app/src/main/res/drawable-xxxhdpi/icon_cp_cgm_target.png new file mode 100644 index 0000000000..2bdaf7d73d Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/icon_cp_cgm_target.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/icon_cp_exercise.png b/app/src/main/res/drawable-xxxhdpi/icon_cp_exercise.png new file mode 100644 index 0000000000..c16560e8de Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/icon_cp_exercise.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/icon_cp_note.png b/app/src/main/res/drawable-xxxhdpi/icon_cp_note.png new file mode 100644 index 0000000000..dd1e04b419 Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/icon_cp_note.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/icon_cp_pump_battery.png b/app/src/main/res/drawable-xxxhdpi/icon_cp_pump_battery.png new file mode 100644 index 0000000000..f1d306de12 Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/icon_cp_pump_battery.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/icon_cp_pump_canula.png b/app/src/main/res/drawable-xxxhdpi/icon_cp_pump_canula.png new file mode 100644 index 0000000000..465111a6ba Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/icon_cp_pump_canula.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/icon_cp_pump_cartridge.png b/app/src/main/res/drawable-xxxhdpi/icon_cp_pump_cartridge.png new file mode 100644 index 0000000000..afffd90482 Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/icon_cp_pump_cartridge.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/icon_cp_question.png b/app/src/main/res/drawable-xxxhdpi/icon_cp_question.png new file mode 100644 index 0000000000..b2e19c1575 Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/icon_cp_question.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/icon_home_loop.png b/app/src/main/res/drawable-xxxhdpi/icon_home_loop.png new file mode 100644 index 0000000000..a59d73e2b4 Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/icon_home_loop.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/icon_home_profile.png b/app/src/main/res/drawable-xxxhdpi/icon_home_profile.png new file mode 100644 index 0000000000..80234a0f75 Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/icon_home_profile.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/icon_home_target.png b/app/src/main/res/drawable-xxxhdpi/icon_home_target.png new file mode 100644 index 0000000000..c1a4d99087 Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/icon_home_target.png differ diff --git a/app/src/main/res/drawable/icon_actions_cancelextbolus.png b/app/src/main/res/drawable/icon_actions_cancelextbolus.png new file mode 100644 index 0000000000..4ad378e374 Binary files /dev/null and b/app/src/main/res/drawable/icon_actions_cancelextbolus.png differ diff --git a/app/src/main/res/drawable/icon_actions_profileswitch.png b/app/src/main/res/drawable/icon_actions_profileswitch.png new file mode 100644 index 0000000000..eeae6ccfdb Binary files /dev/null and b/app/src/main/res/drawable/icon_actions_profileswitch.png differ diff --git a/app/src/main/res/drawable/icon_actions_refill.png b/app/src/main/res/drawable/icon_actions_refill.png new file mode 100644 index 0000000000..737cca8b00 Binary files /dev/null and b/app/src/main/res/drawable/icon_actions_refill.png differ diff --git a/app/src/main/res/drawable/icon_actions_startextbolus.png b/app/src/main/res/drawable/icon_actions_startextbolus.png new file mode 100644 index 0000000000..338df773c2 Binary files /dev/null and b/app/src/main/res/drawable/icon_actions_startextbolus.png differ diff --git a/app/src/main/res/drawable/icon_actions_starttempbasal.png b/app/src/main/res/drawable/icon_actions_starttempbasal.png new file mode 100644 index 0000000000..18fbd8c111 Binary files /dev/null and b/app/src/main/res/drawable/icon_actions_starttempbasal.png differ diff --git a/app/src/main/res/drawable/icon_actions_temptarget.png b/app/src/main/res/drawable/icon_actions_temptarget.png new file mode 100644 index 0000000000..39170bab37 Binary files /dev/null and b/app/src/main/res/drawable/icon_actions_temptarget.png differ diff --git a/app/src/main/res/drawable/icon_cp_aaps_offline.png b/app/src/main/res/drawable/icon_cp_aaps_offline.png new file mode 100644 index 0000000000..dc50653883 Binary files /dev/null and b/app/src/main/res/drawable/icon_cp_aaps_offline.png differ diff --git a/app/src/main/res/drawable/icon_cp_age_battery.png b/app/src/main/res/drawable/icon_cp_age_battery.png new file mode 100644 index 0000000000..6c7fc56139 Binary files /dev/null and b/app/src/main/res/drawable/icon_cp_age_battery.png differ diff --git a/app/src/main/res/drawable/icon_cp_age_canula.png b/app/src/main/res/drawable/icon_cp_age_canula.png new file mode 100644 index 0000000000..303ad946cd Binary files /dev/null and b/app/src/main/res/drawable/icon_cp_age_canula.png differ diff --git a/app/src/main/res/drawable/icon_cp_age_insulin.png b/app/src/main/res/drawable/icon_cp_age_insulin.png new file mode 100644 index 0000000000..5cd8598faa Binary files /dev/null and b/app/src/main/res/drawable/icon_cp_age_insulin.png differ diff --git a/app/src/main/res/drawable/icon_cp_age_sensor.png b/app/src/main/res/drawable/icon_cp_age_sensor.png new file mode 100644 index 0000000000..d312b6c572 Binary files /dev/null and b/app/src/main/res/drawable/icon_cp_age_sensor.png differ diff --git a/app/src/main/res/drawable/icon_cp_announcement.png b/app/src/main/res/drawable/icon_cp_announcement.png new file mode 100644 index 0000000000..6e1338ac24 Binary files /dev/null and b/app/src/main/res/drawable/icon_cp_announcement.png differ diff --git a/app/src/main/res/drawable/icon_cp_basal_end.png b/app/src/main/res/drawable/icon_cp_basal_end.png new file mode 100644 index 0000000000..be8474f002 Binary files /dev/null and b/app/src/main/res/drawable/icon_cp_basal_end.png differ diff --git a/app/src/main/res/drawable/icon_cp_basal_start.png b/app/src/main/res/drawable/icon_cp_basal_start.png new file mode 100644 index 0000000000..34cd31f14b Binary files /dev/null and b/app/src/main/res/drawable/icon_cp_basal_start.png differ diff --git a/app/src/main/res/drawable/icon_cp_bgcheck.png b/app/src/main/res/drawable/icon_cp_bgcheck.png new file mode 100644 index 0000000000..0cb14c2f57 Binary files /dev/null and b/app/src/main/res/drawable/icon_cp_bgcheck.png differ diff --git a/app/src/main/res/drawable/icon_cp_bolus_carbs.png b/app/src/main/res/drawable/icon_cp_bolus_carbs.png new file mode 100644 index 0000000000..561703fb06 Binary files /dev/null and b/app/src/main/res/drawable/icon_cp_bolus_carbs.png differ diff --git a/app/src/main/res/drawable/icon_cp_bolus_combo.png b/app/src/main/res/drawable/icon_cp_bolus_combo.png new file mode 100644 index 0000000000..ce4d8fb9d3 Binary files /dev/null and b/app/src/main/res/drawable/icon_cp_bolus_combo.png differ diff --git a/app/src/main/res/drawable/icon_cp_bolus_correction.png b/app/src/main/res/drawable/icon_cp_bolus_correction.png new file mode 100644 index 0000000000..582472dc92 Binary files /dev/null and b/app/src/main/res/drawable/icon_cp_bolus_correction.png differ diff --git a/app/src/main/res/drawable/icon_cp_bolus_meal.png b/app/src/main/res/drawable/icon_cp_bolus_meal.png new file mode 100644 index 0000000000..54b51e126e Binary files /dev/null and b/app/src/main/res/drawable/icon_cp_bolus_meal.png differ diff --git a/app/src/main/res/drawable/icon_cp_bolus_snack.png b/app/src/main/res/drawable/icon_cp_bolus_snack.png new file mode 100644 index 0000000000..b2ba41c27d Binary files /dev/null and b/app/src/main/res/drawable/icon_cp_bolus_snack.png differ diff --git a/app/src/main/res/drawable/icon_cp_cgm_insert.png b/app/src/main/res/drawable/icon_cp_cgm_insert.png new file mode 100644 index 0000000000..67c0fb1ba2 Binary files /dev/null and b/app/src/main/res/drawable/icon_cp_cgm_insert.png differ diff --git a/app/src/main/res/drawable/icon_cp_cgm_profile.png b/app/src/main/res/drawable/icon_cp_cgm_profile.png new file mode 100644 index 0000000000..e0f0a15cc8 Binary files /dev/null and b/app/src/main/res/drawable/icon_cp_cgm_profile.png differ diff --git a/app/src/main/res/drawable/icon_cp_cgm_start.png b/app/src/main/res/drawable/icon_cp_cgm_start.png new file mode 100644 index 0000000000..14a44bc852 Binary files /dev/null and b/app/src/main/res/drawable/icon_cp_cgm_start.png differ diff --git a/app/src/main/res/drawable/icon_cp_cgm_target.png b/app/src/main/res/drawable/icon_cp_cgm_target.png new file mode 100644 index 0000000000..86ce00442c Binary files /dev/null and b/app/src/main/res/drawable/icon_cp_cgm_target.png differ diff --git a/app/src/main/res/drawable/icon_cp_exercise.png b/app/src/main/res/drawable/icon_cp_exercise.png new file mode 100644 index 0000000000..1c92c0ebb5 Binary files /dev/null and b/app/src/main/res/drawable/icon_cp_exercise.png differ diff --git a/app/src/main/res/drawable/icon_cp_note.png b/app/src/main/res/drawable/icon_cp_note.png new file mode 100644 index 0000000000..7c8663a4fe Binary files /dev/null and b/app/src/main/res/drawable/icon_cp_note.png differ diff --git a/app/src/main/res/drawable/icon_cp_pump_battery.png b/app/src/main/res/drawable/icon_cp_pump_battery.png new file mode 100644 index 0000000000..f4dab169a8 Binary files /dev/null and b/app/src/main/res/drawable/icon_cp_pump_battery.png differ diff --git a/app/src/main/res/drawable/icon_cp_pump_canula.png b/app/src/main/res/drawable/icon_cp_pump_canula.png new file mode 100644 index 0000000000..ee512c5fef Binary files /dev/null and b/app/src/main/res/drawable/icon_cp_pump_canula.png differ diff --git a/app/src/main/res/drawable/icon_cp_pump_cartridge.png b/app/src/main/res/drawable/icon_cp_pump_cartridge.png new file mode 100644 index 0000000000..70a90c596f Binary files /dev/null and b/app/src/main/res/drawable/icon_cp_pump_cartridge.png differ diff --git a/app/src/main/res/drawable/icon_cp_question.png b/app/src/main/res/drawable/icon_cp_question.png new file mode 100644 index 0000000000..5d430d9164 Binary files /dev/null and b/app/src/main/res/drawable/icon_cp_question.png differ diff --git a/app/src/main/res/drawable/icon_home_loop.png b/app/src/main/res/drawable/icon_home_loop.png new file mode 100644 index 0000000000..5240cc85db Binary files /dev/null and b/app/src/main/res/drawable/icon_home_loop.png differ diff --git a/app/src/main/res/drawable/icon_home_profile.png b/app/src/main/res/drawable/icon_home_profile.png new file mode 100644 index 0000000000..f689df10c6 Binary files /dev/null and b/app/src/main/res/drawable/icon_home_profile.png differ diff --git a/app/src/main/res/drawable/icon_home_target.png b/app/src/main/res/drawable/icon_home_target.png new file mode 100644 index 0000000000..9fc7086e9d Binary files /dev/null and b/app/src/main/res/drawable/icon_home_target.png differ diff --git a/app/src/main/res/values-bg/strings.xml b/app/src/main/res/values-bg/strings.xml index 480c780025..460e57d226 100644 --- a/app/src/main/res/values-bg/strings.xml +++ b/app/src/main/res/values-bg/strings.xml @@ -1,6 +1,6 @@ - Сигурност на лечението + Настройки на сигурността Максимален инсулин при болус [единици] Максимални въглехидрати [гр] @@ -13,15 +13,15 @@ Изход Използвай удължен болус за над 200% DanaR Bluetooth устройство - Използване само на абсолютни стойности на базал - Рестартирайте телефона или AndroidAPS от системните натройки \nили Android APS няма да записва проблемите (което е важно за работата на алгоритъма)! + Използване на абсолютни стойности за базал + Рестартирайте телефона или AndroidAPS от системните настройки или Android APS няма да записва проблемите (което е важно за работата на алгоритъма)! Цел: Действие: Стартирай Провери Единици DIA (Време на действие на инсулина): - Active profile + Активен профил IC (Инсулин/въглехидр.): ISF (Инс.чувствителност): Базал @@ -135,24 +135,24 @@ APS режим Затворен цикъл - Отворен режим + Отворен цикъл изключен Изключи - Влючи + Включи Има ново предложение Несъвместима версия на NSClient Несъвместима версия на Nightscout NSClient не е открит. Записът е загубен! - КЗ се вижда в NS - Статуса на помпа е достъпен в NS + КЗ да се вижда в NS + Статуса на помпа да е достъпен в NS Ръчно приложени ЦИКЪЛА Е СПРЯН ОТ ОГРАНИЧЕНИЯТА Czech English Базален IOB Приложено ограничение на болус - Приложено ограничение на въглехидратите + Приложено ограничение на въглехидрати Проверка на КЗ Известие Бележка @@ -215,7 +215,7 @@ Максимално позволен временен базал Е/ч Макс. лимит на временен базал [Е/ч] Максимален IOB - Този параметър се нарича макс IOB в OpenAPS\nПо подразбиране е 0. След няколко дни или седмици можете да го увеличите. + Този параметър се нарича максимален IOB в OpenAPS и подразбиране е 0. След няколко дни или седмици можете да го увеличите. Bulgarian Разбрах Език @@ -249,16 +249,16 @@ Абсолютна Откажи временен базал SMS комуникатор - Чакам резултат от помпата + Изчаква резултат от помпата Разрешени телефонни номера +XXXXXXXXXX;+YYYYYYYYYY - За да пуснете болус от %.2fЕ отговорете с код %s + За да доставите болус от %.2fЕ отговорете с код %s За да изпратите калибрация %.2f отговорете с код %s Болус отказан Болус %.2fЕд беше подаден успешно - Подавам болус %.2fЕ + Подава болус %.2fЕ Болус от %.2fЕ подаден успешно - Подавам %.2fЕ + Подава %.2fЕ Позволи отдалечени команди чрез SMS Отдалечено подаване на болус - забранено! Пръст @@ -268,7 +268,7 @@ Откажи временна цел DanaR профил DIA (Време на действие на инсулина) ч.: - Продължителност на инсулиновата активност + Продължителност на действие на инсулина Неуспешно обноввяване на базалния профил История Презареди @@ -293,7 +293,7 @@ КЗ Пълнене Спиране - Опитвам да се свържа през последните %d с + Опитва да се свърже през последните %d с Парола за помпата Грешна парола за помпата! Помпата е заета @@ -302,8 +302,8 @@ Запушване Спри Натиснат е СТОП! - Чакам помпата - Чакам резутат. Натисни за обновяване. + Очаква помпата + Очаква резутат. Натисни за обновяване. Ще доставя %.2fЕ Настройка на визуализацията и наблюдението, а също и анализиране на базалните нужди и коефициенти Работете в Отворен режим няколко дни и ръчно прилагайте на много временни базали @@ -357,17 +357,17 @@ Prime/Fill Моля, уверете се, че стойността съответсва на вашият сет! Този инсулин не се включва в IOB! Други - Fill/Prime количества нсулин по подразбиране. + Fill/Prime количества инсулин по подразбиране. Бутон 1 Бутон 2 Бутон 3 % с който базовият профил ще бъде променен. - Точен брой часове, с които ще бъде преместен профила! + Точен брой часове, с които ще бъде изместен профила! Изпрати в помпата Единици: мг/дл ммол/л - DIA(продължителност на инсулиновото дейстие): + DIA(продължителност на действие на инсулина): Целеви диапазон: Редактирай базални стойности Редактирай Инс. чувствителност @@ -381,7 +381,7 @@ Ниска КЗ под Висока КЗ над Часовник - Препрати всички дани + Изпрати отново всички дани Отвори настройките на часовника Грешка в промпата Изтощена батерия @@ -408,7 +408,7 @@ OpenAPS AMA Краткоср. Δ: Дългоср. Δ: - Масив от %d елемента. \nАктуална стойност: + Масив от %d елемента.Актуална стойност: Autosens данни Script debug Разреши AMA autosens @@ -433,7 +433,7 @@ Инициализация ... ДЕЙСТВ КОНФ - ЦИК + LOOP ОПр OAPS Вцел @@ -445,18 +445,18 @@ ВП NSП Леч - CP + КП Цел WEAR SMS - Изполвай къси имена + Използвай къси имена Настройки на параметър Δ КЗ Използвай краткоср. Δ вместо разлика от последната КЗ Полезно при данни за КЗ с много шум Разширени настройки Медел: %02X Протокол: %02X Код: %02X Профил - По подразбиране: 3\nТова е основен параметър в сигурността на OpenAPS. Той лимитира максималният базал да бъде 3 пъти най-голямата стойност от дневните базали. Не би трябвало да има нужа от промяна, но внимавайте, защото от опит сме проверили, че максимумите са “3x от най-високия дневен; 4x от текущия”. + По подразбиране: 3 Това е основен параметър в сигурността на OpenAPS. Той ограничава максималният базал да бъде 3 пъти най-голямата стойност от дневните базали. Не би трябвало да има нужа от промяна, защото от опит сме проверили, че максимумите са “3x от най-високия дневен; 4x от текущия”. По подразбиране: 4\nТова е другият основен параметър в сигурността на OpenAPS, и другата половина от "3x от най-високия дневен; 4x от текущия". Това означава, че независимо от макс базал настроен в помпата, стойността на базала не може да е по-висока от тази стойност умножена по стойността на базала за текущият час от денонощието. Това е с цел да предпази от прекалено високи стойности на максималния базал преди да разбират как работи алгоритъма. Повечето от Вас няма да имат нужда от смяна на тази стойност и могат да се справят с настойки на другите параметри. По подразбиране: 1.2\nТова е максималният множител на autosens (а скоро autotune) за да позволи 20% максимален лимит на autosens коефициента, който от своя страна настройва базалите, колко може да намали ISF, и колко ниско може да свали целевата КЗ. По подразбиране: 0.7\nДругата част от сигурността на autosens, слагайки ограничение на колко ниско може да ограничи базалите, колко да повиши чувствителността (ISF) и целевите КЗ. @@ -466,8 +466,8 @@ Attention!\nNormally you do not have to change these values below. Please CLICK HERE and READ the text and make sure you UNDERSTAND it before change any of these values. http://openaps.readthedocs.io/en/latest/docs/walkthrough/phase-3/beyond-low-glucose-suspend.html Позволени са само числа - Позволени са числа между %1$s - %2$s - олето не може да бъде празно + Позволени са числа между %1$s - %2$s + Полето не може да бъде празно Телефонният номер не е валиден Грешен тел номер за SMS Копирай @@ -484,16 +484,16 @@ Не показвай отново Помпата е спряна. Натиснете за обновяване Помпата е спряна - Получавам статус на помпата - Настройвам временен базал - Спирам временен базал - Настойвам удължен болус - Спирам удължен болус - Обновявам базалите - Спирам връзката - Изпълнявам + Получава статус на помпата + Настройва временен базал + Спира временен базал + Настойва удължен болус + Спира удължен болус + Обновява базалите + Спира връзката + Изпълнява Настойки Виртуална Помпа - Качвам статуса в NS + Качва статуса в NS Грешна парола Парола за настройки Отключи настройките @@ -518,7 +518,7 @@ Опашка: Статус: пауза - Възраст на пациента + Възраст на потребителя Дете Тийнейджър Възрастен @@ -526,7 +526,7 @@ Glimp Устройството изглежда не подържа изключване на оптимизиране на батерията! Моля, позволете рарешение - %s се нуждае от зключване на оптимизиране на батерията за пълна функционалност + %s се нуждае от зключване на оптимизиране на батерията за пълна функционалност Цикъл изключен Изключен (%d мин) Суперболус (%d мин) @@ -548,7 +548,7 @@ COB Суперболус Записвай всяко стартиране на AndroidAPS в NS - Рестартирам за да се приложат новите настройки. + Рестартиране за да се приложат новите настройки. DanaRv2 Инсулин Бързодействащ инсулин @@ -619,7 +619,7 @@ Настройки за абсорбция Максимално време за усвояване на храненето [ч] Брой часове, за които се очаква храненето да бъде напълно усвоено в организма - Показвай удължените болуси като % + Показвай удължените болуси като % ВСенз ВИнс ВКан diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index 6aa5dc7979..cb011f510e 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -387,11 +387,10 @@ ENVIAR A BOMBA Media corta delta Bolo: - Ultimo BG: + Último BG: %dmin antes Bolo %.2fU enviado correctamente Rango Objetivo: - Unidades: Sólo se permiten caracteres numéricos Sólo se permiten dígitos en el rango %1$s - %2$s diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index 10ed6e1d4c..48cd17b8a1 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -4,9 +4,7 @@ Italiano MM640g assoluto - azioni - attivita\' adulto settaggi avanzati diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 436e54c4aa..5cf65a184a 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -691,4 +691,4 @@ COMBO Enable loacal broadcasts to other apps (like xDrip). Enable local Broadcasts. - + \ No newline at end of file