diff --git a/app/src/main/java/info/nightscout/androidaps/MainApp.java b/app/src/main/java/info/nightscout/androidaps/MainApp.java
index 3431bfd39c..18727d87f0 100644
--- a/app/src/main/java/info/nightscout/androidaps/MainApp.java
+++ b/app/src/main/java/info/nightscout/androidaps/MainApp.java
@@ -30,11 +30,11 @@ import info.nightscout.androidaps.plugins.ConfigBuilder.ConfigBuilderFragment;
import info.nightscout.androidaps.plugins.ConfigBuilder.ConfigBuilderPlugin;
import info.nightscout.androidaps.plugins.ConstraintsObjectives.ObjectivesFragment;
import info.nightscout.androidaps.plugins.ConstraintsSafety.SafetyPlugin;
-import info.nightscout.androidaps.plugins.InsulinFastacting.InsulinFastactingFragment;
-import info.nightscout.androidaps.plugins.InsulinFastactingProlonged.InsulinFastactingProlongedFragment;
-import info.nightscout.androidaps.plugins.InsulinOrefCurves.InsulinOrefFreePeakFragment;
-import info.nightscout.androidaps.plugins.InsulinOrefCurves.InsulinOrefRapidActingFragment;
-import info.nightscout.androidaps.plugins.InsulinOrefCurves.InsulinOrefUltraRapidActingFragment;
+import info.nightscout.androidaps.plugins.Insulin.InsulinFastactingPlugin;
+import info.nightscout.androidaps.plugins.Insulin.InsulinFastactingProlongedPlugin;
+import info.nightscout.androidaps.plugins.Insulin.InsulinOrefFreePeakPlugin;
+import info.nightscout.androidaps.plugins.Insulin.InsulinOrefRapidActingPlugin;
+import info.nightscout.androidaps.plugins.Insulin.InsulinOrefUltraRapidActingPlugin;
import info.nightscout.androidaps.plugins.IobCobCalculator.IobCobCalculatorPlugin;
import info.nightscout.androidaps.plugins.Loop.LoopFragment;
import info.nightscout.androidaps.plugins.NSClientInternal.NSClientInternalFragment;
@@ -112,11 +112,11 @@ public class MainApp extends Application {
pluginsList.add(OverviewFragment.getPlugin());
pluginsList.add(IobCobCalculatorPlugin.getPlugin());
if (Config.ACTION) pluginsList.add(ActionsFragment.getPlugin());
- pluginsList.add(InsulinFastactingFragment.getPlugin());
- pluginsList.add(InsulinFastactingProlongedFragment.getPlugin());
- pluginsList.add(InsulinOrefRapidActingFragment.getPlugin());
- pluginsList.add(InsulinOrefUltraRapidActingFragment.getPlugin());
- pluginsList.add(InsulinOrefFreePeakFragment.getPlugin());
+ pluginsList.add(InsulinFastactingPlugin.getPlugin());
+ pluginsList.add(InsulinFastactingProlongedPlugin.getPlugin());
+ pluginsList.add(InsulinOrefRapidActingPlugin.getPlugin());
+ pluginsList.add(InsulinOrefUltraRapidActingPlugin.getPlugin());
+ pluginsList.add(InsulinOrefFreePeakPlugin.getPlugin());
pluginsList.add(SensitivityOref0Plugin.getPlugin());
pluginsList.add(SensitivityAAPSPlugin.getPlugin());
pluginsList.add(SensitivityWeightedAveragePlugin.getPlugin());
diff --git a/app/src/main/java/info/nightscout/androidaps/PreferencesActivity.java b/app/src/main/java/info/nightscout/androidaps/PreferencesActivity.java
index 5c3372123e..c5abda1eae 100644
--- a/app/src/main/java/info/nightscout/androidaps/PreferencesActivity.java
+++ b/app/src/main/java/info/nightscout/androidaps/PreferencesActivity.java
@@ -14,7 +14,7 @@ import android.preference.PreferenceManager;
import info.nightscout.androidaps.events.EventPreferenceChange;
import info.nightscout.androidaps.events.EventRefreshGui;
import info.nightscout.androidaps.interfaces.PluginBase;
-import info.nightscout.androidaps.plugins.InsulinOrefCurves.InsulinOrefFreePeakPlugin;
+import info.nightscout.androidaps.plugins.Insulin.InsulinOrefFreePeakPlugin;
import info.nightscout.androidaps.plugins.PumpDanaR.BluetoothDevicePreference;
import info.nightscout.androidaps.plugins.PumpDanaR.DanaRPlugin;
import info.nightscout.androidaps.plugins.PumpDanaRKorean.DanaRKoreanPlugin;
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/ConfigBuilder/ConfigBuilderFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/ConfigBuilder/ConfigBuilderFragment.java
index 3f2c27ef08..e79c1b06ba 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/ConfigBuilder/ConfigBuilderFragment.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/ConfigBuilder/ConfigBuilderFragment.java
@@ -4,7 +4,6 @@ package info.nightscout.androidaps.plugins.ConfigBuilder;
import android.content.Context;
import android.os.Bundle;
import android.support.v4.app.Fragment;
-import android.util.DisplayMetrics;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@@ -21,7 +20,6 @@ import com.crashlytics.android.answers.CustomEvent;
import java.util.ArrayList;
-import info.nightscout.androidaps.Constants;
import info.nightscout.androidaps.MainApp;
import info.nightscout.androidaps.R;
import info.nightscout.androidaps.events.EventConfigBuilderChange;
@@ -34,7 +32,7 @@ import info.nightscout.androidaps.interfaces.PluginBase;
import info.nightscout.androidaps.interfaces.ProfileInterface;
import info.nightscout.androidaps.interfaces.PumpInterface;
import info.nightscout.androidaps.interfaces.SensitivityInterface;
-import info.nightscout.androidaps.plugins.InsulinFastacting.InsulinFastactingPlugin;
+import info.nightscout.androidaps.plugins.Insulin.InsulinFastactingPlugin;
import info.nightscout.androidaps.plugins.ProfileNS.NSProfilePlugin;
import info.nightscout.androidaps.plugins.PumpVirtual.VirtualPumpPlugin;
import info.nightscout.androidaps.plugins.SensitivityOref0.SensitivityOref0Plugin;
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/InsulinFastacting/ActivityGraph.java b/app/src/main/java/info/nightscout/androidaps/plugins/Insulin/ActivityGraph.java
similarity index 97%
rename from app/src/main/java/info/nightscout/androidaps/plugins/InsulinFastacting/ActivityGraph.java
rename to app/src/main/java/info/nightscout/androidaps/plugins/Insulin/ActivityGraph.java
index 3eda06fb37..5a0d7fcce9 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/InsulinFastacting/ActivityGraph.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/Insulin/ActivityGraph.java
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.InsulinFastacting;
+package info.nightscout.androidaps.plugins.Insulin;
import android.content.Context;
import android.graphics.Color;
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/InsulinFastacting/InsulinFastactingPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/Insulin/InsulinFastactingPlugin.java
similarity index 91%
rename from app/src/main/java/info/nightscout/androidaps/plugins/InsulinFastacting/InsulinFastactingPlugin.java
rename to app/src/main/java/info/nightscout/androidaps/plugins/Insulin/InsulinFastactingPlugin.java
index e055e3d3ed..3c7a7b950e 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/InsulinFastacting/InsulinFastactingPlugin.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/Insulin/InsulinFastactingPlugin.java
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.InsulinFastacting;
+package info.nightscout.androidaps.plugins.Insulin;
import info.nightscout.androidaps.Constants;
import info.nightscout.androidaps.MainApp;
@@ -17,6 +17,14 @@ public class InsulinFastactingPlugin implements PluginBase, InsulinInterface {
private static boolean fragmentEnabled = true;
private static boolean fragmentVisible = false;
+ private static InsulinFastactingPlugin plugin = null;
+
+ public static InsulinFastactingPlugin getPlugin() {
+ if (plugin == null)
+ plugin = new InsulinFastactingPlugin();
+ return plugin;
+ }
+
@Override
public int getType() {
return INSULIN;
@@ -24,7 +32,7 @@ public class InsulinFastactingPlugin implements PluginBase, InsulinInterface {
@Override
public String getFragmentClass() {
- return InsulinFastactingFragment.class.getName();
+ return InsulinFragment.class.getName();
}
@Override
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/InsulinFastactingProlonged/InsulinFastactingProlongedPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/Insulin/InsulinFastactingProlongedPlugin.java
similarity index 91%
rename from app/src/main/java/info/nightscout/androidaps/plugins/InsulinFastactingProlonged/InsulinFastactingProlongedPlugin.java
rename to app/src/main/java/info/nightscout/androidaps/plugins/Insulin/InsulinFastactingProlongedPlugin.java
index 3c5df052df..a9f95f0776 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/InsulinFastactingProlonged/InsulinFastactingProlongedPlugin.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/Insulin/InsulinFastactingProlongedPlugin.java
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.InsulinFastactingProlonged;
+package info.nightscout.androidaps.plugins.Insulin;
import info.nightscout.androidaps.Constants;
import info.nightscout.androidaps.MainApp;
@@ -17,6 +17,14 @@ public class InsulinFastactingProlongedPlugin implements PluginBase, InsulinInte
private static boolean fragmentEnabled = false;
private static boolean fragmentVisible = false;
+ private static InsulinFastactingProlongedPlugin plugin = null;
+
+ public static InsulinFastactingProlongedPlugin getPlugin() {
+ if (plugin == null)
+ plugin = new InsulinFastactingProlongedPlugin();
+ return plugin;
+ }
+
@Override
public int getType() {
return INSULIN;
@@ -24,7 +32,7 @@ public class InsulinFastactingProlongedPlugin implements PluginBase, InsulinInte
@Override
public String getFragmentClass() {
- return InsulinFastactingProlongedFragment.class.getName();
+ return InsulinFragment.class.getName();
}
@Override
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/InsulinFastacting/InsulinFastactingFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/Insulin/InsulinFragment.java
similarity index 67%
rename from app/src/main/java/info/nightscout/androidaps/plugins/InsulinFastacting/InsulinFastactingFragment.java
rename to app/src/main/java/info/nightscout/androidaps/plugins/Insulin/InsulinFragment.java
index f62d063193..7cd14f346c 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/InsulinFastacting/InsulinFastactingFragment.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/Insulin/InsulinFragment.java
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.InsulinFastacting;
+package info.nightscout.androidaps.plugins.Insulin;
import android.os.Bundle;
import android.support.v4.app.Fragment;
@@ -14,13 +14,7 @@ import info.nightscout.androidaps.R;
* Created by mike on 17.04.2017.
*/
-public class InsulinFastactingFragment extends Fragment {
- static InsulinFastactingPlugin insulinFastactingPlugin = new InsulinFastactingPlugin();
-
- static public InsulinFastactingPlugin getPlugin() {
- return insulinFastactingPlugin;
- }
-
+public class InsulinFragment extends Fragment {
TextView insulinName;
TextView insulinComment;
TextView insulinDia;
@@ -47,10 +41,10 @@ public class InsulinFastactingFragment extends Fragment {
}
private void updateGUI() {
- insulinName.setText(insulinFastactingPlugin.getFriendlyName());
- insulinComment.setText(insulinFastactingPlugin.getComment());
- insulinDia.setText(MainApp.sResources.getText(R.string.dia) + " " + Double.toString(insulinFastactingPlugin.getDia()) + "h");
- insulinGraph.show(insulinFastactingPlugin);
+ insulinName.setText(MainApp.getConfigBuilder().getActiveInsulin().getFriendlyName());
+ insulinComment.setText(MainApp.getConfigBuilder().getActiveInsulin().getComment());
+ insulinDia.setText(MainApp.sResources.getText(R.string.dia) + " " + Double.toString(MainApp.getConfigBuilder().getActiveInsulin().getDia()) + "h");
+ insulinGraph.show(MainApp.getConfigBuilder().getActiveInsulin());
}
}
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/InsulinOrefCurves/InsulinOrefBasePlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/Insulin/InsulinOrefBasePlugin.java
similarity index 98%
rename from app/src/main/java/info/nightscout/androidaps/plugins/InsulinOrefCurves/InsulinOrefBasePlugin.java
rename to app/src/main/java/info/nightscout/androidaps/plugins/Insulin/InsulinOrefBasePlugin.java
index 10dfd5dce5..b37e3b5c85 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/InsulinOrefCurves/InsulinOrefBasePlugin.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/Insulin/InsulinOrefBasePlugin.java
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.InsulinOrefCurves;
+package info.nightscout.androidaps.plugins.Insulin;
import info.nightscout.androidaps.Constants;
import info.nightscout.androidaps.MainApp;
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/InsulinOrefCurves/InsulinOrefFreePeakPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/Insulin/InsulinOrefFreePeakPlugin.java
similarity index 82%
rename from app/src/main/java/info/nightscout/androidaps/plugins/InsulinOrefCurves/InsulinOrefFreePeakPlugin.java
rename to app/src/main/java/info/nightscout/androidaps/plugins/Insulin/InsulinOrefFreePeakPlugin.java
index 747eabda5b..53612762ec 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/InsulinOrefCurves/InsulinOrefFreePeakPlugin.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/Insulin/InsulinOrefFreePeakPlugin.java
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.InsulinOrefCurves;
+package info.nightscout.androidaps.plugins.Insulin;
import info.nightscout.androidaps.MainApp;
import info.nightscout.androidaps.R;
@@ -13,6 +13,14 @@ public class InsulinOrefFreePeakPlugin extends InsulinOrefBasePlugin {
private static boolean fragmentEnabled = false;
private static boolean fragmentVisible = false;
+ private static InsulinOrefFreePeakPlugin plugin = null;
+
+ public static InsulinOrefFreePeakPlugin getPlugin() {
+ if (plugin == null)
+ plugin = new InsulinOrefFreePeakPlugin();
+ return plugin;
+ }
+
public static final int DEFAULT_PEAK = 75;
@Override
@@ -27,7 +35,7 @@ public class InsulinOrefFreePeakPlugin extends InsulinOrefBasePlugin {
@Override
public String getFragmentClass() {
- return InsulinOrefFreePeakFragment.class.getName();
+ return InsulinFragment.class.getName();
}
@Override
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/InsulinOrefCurves/InsulinOrefRapidActingPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/Insulin/InsulinOrefRapidActingPlugin.java
similarity index 81%
rename from app/src/main/java/info/nightscout/androidaps/plugins/InsulinOrefCurves/InsulinOrefRapidActingPlugin.java
rename to app/src/main/java/info/nightscout/androidaps/plugins/Insulin/InsulinOrefRapidActingPlugin.java
index 6f6973bc58..c8791869a5 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/InsulinOrefCurves/InsulinOrefRapidActingPlugin.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/Insulin/InsulinOrefRapidActingPlugin.java
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.InsulinOrefCurves;
+package info.nightscout.androidaps.plugins.Insulin;
import info.nightscout.androidaps.MainApp;
import info.nightscout.androidaps.R;
@@ -12,6 +12,14 @@ public class InsulinOrefRapidActingPlugin extends InsulinOrefBasePlugin {
private static boolean fragmentEnabled = false;
private static boolean fragmentVisible = false;
+ private static InsulinOrefRapidActingPlugin plugin = null;
+
+ public static InsulinOrefRapidActingPlugin getPlugin() {
+ if (plugin == null)
+ plugin = new InsulinOrefRapidActingPlugin();
+ return plugin;
+ }
+
public static final int PEAK = 75;
@Override
@@ -26,7 +34,7 @@ public class InsulinOrefRapidActingPlugin extends InsulinOrefBasePlugin {
@Override
public String getFragmentClass() {
- return InsulinOrefRapidActingFragment.class.getName();
+ return InsulinFragment.class.getName();
}
@Override
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/InsulinOrefCurves/InsulinOrefUltraRapidActingPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/Insulin/InsulinOrefUltraRapidActingPlugin.java
similarity index 81%
rename from app/src/main/java/info/nightscout/androidaps/plugins/InsulinOrefCurves/InsulinOrefUltraRapidActingPlugin.java
rename to app/src/main/java/info/nightscout/androidaps/plugins/Insulin/InsulinOrefUltraRapidActingPlugin.java
index 975707d38b..0f09d96d74 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/InsulinOrefCurves/InsulinOrefUltraRapidActingPlugin.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/Insulin/InsulinOrefUltraRapidActingPlugin.java
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.InsulinOrefCurves;
+package info.nightscout.androidaps.plugins.Insulin;
import info.nightscout.androidaps.MainApp;
import info.nightscout.androidaps.R;
@@ -12,6 +12,14 @@ public class InsulinOrefUltraRapidActingPlugin extends InsulinOrefBasePlugin {
private static boolean fragmentEnabled = false;
private static boolean fragmentVisible = false;
+ private static InsulinOrefUltraRapidActingPlugin plugin = null;
+
+ public static InsulinOrefUltraRapidActingPlugin getPlugin() {
+ if (plugin == null)
+ plugin = new InsulinOrefUltraRapidActingPlugin();
+ return plugin;
+ }
+
public static final int PEAK = 55;
@Override
@@ -26,7 +34,7 @@ public class InsulinOrefUltraRapidActingPlugin extends InsulinOrefBasePlugin {
@Override
public String getFragmentClass() {
- return InsulinOrefUltraRapidActingFragment.class.getName();
+ return InsulinFragment.class.getName();
}
@Override
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
deleted file mode 100644
index 1747f5f4ab..0000000000
--- a/app/src/main/java/info/nightscout/androidaps/plugins/InsulinFastactingProlonged/InsulinFastactingProlongedFragment.java
+++ /dev/null
@@ -1,57 +0,0 @@
-package info.nightscout.androidaps.plugins.InsulinFastactingProlonged;
-
-import android.os.Bundle;
-import android.support.v4.app.Fragment;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.TextView;
-
-import info.nightscout.androidaps.MainApp;
-import info.nightscout.androidaps.R;
-import info.nightscout.androidaps.plugins.InsulinFastacting.ActivityGraph;
-
-/**
- * Created by mike on 17.04.2017.
- */
-
-public class InsulinFastactingProlongedFragment extends Fragment {
- static InsulinFastactingProlongedPlugin insulinFastactingProlongedPlugin = new InsulinFastactingProlongedPlugin();
-
- static public InsulinFastactingProlongedPlugin getPlugin() {
- return insulinFastactingProlongedPlugin;
- }
-
- TextView insulinName;
- TextView insulinComment;
- TextView insulinDia;
- ActivityGraph insulinGraph;
-
- public View onCreateView(LayoutInflater inflater, ViewGroup container,
- Bundle savedInstanceState) {
- View view = inflater.inflate(R.layout.insulin_fragment, container, false);
-
- insulinName = (TextView) view.findViewById(R.id.insulin_name);
- insulinComment = (TextView) view.findViewById(R.id.insulin_comment);
- insulinDia = (TextView) view.findViewById(R.id.insulin_dia);
- insulinGraph = (ActivityGraph) view.findViewById(R.id.insuling_graph);
-
- 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) + " " + Double.toString(insulinFastactingProlongedPlugin.getDia()) + "h");
- insulinGraph.show(insulinFastactingProlongedPlugin);
- }
-
-}
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/InsulinOrefCurves/InsulinOrefFreePeakFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/InsulinOrefCurves/InsulinOrefFreePeakFragment.java
deleted file mode 100644
index f7120369b3..0000000000
--- a/app/src/main/java/info/nightscout/androidaps/plugins/InsulinOrefCurves/InsulinOrefFreePeakFragment.java
+++ /dev/null
@@ -1,58 +0,0 @@
-package info.nightscout.androidaps.plugins.InsulinOrefCurves;
-
-import android.os.Bundle;
-import android.support.v4.app.Fragment;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.TextView;
-
-import info.nightscout.androidaps.MainApp;
-import info.nightscout.androidaps.R;
-import info.nightscout.androidaps.plugins.InsulinFastacting.ActivityGraph;
-
-/**
- * Created by adrian on 14/08/17.
- */
-
-public class InsulinOrefFreePeakFragment extends Fragment {
-
- static InsulinOrefFreePeakPlugin insulinPlugin = new InsulinOrefFreePeakPlugin();
-
- static public InsulinOrefFreePeakPlugin getPlugin() {
- return insulinPlugin;
- }
-
- TextView insulinName;
- TextView insulinComment;
- TextView insulinDia;
- ActivityGraph insulinGraph;
-
- public View onCreateView(LayoutInflater inflater, ViewGroup container,
- Bundle savedInstanceState) {
- View view = inflater.inflate(R.layout.insulin_fragment, container, false);
-
- insulinName = (TextView) view.findViewById(R.id.insulin_name);
- insulinComment = (TextView) view.findViewById(R.id.insulin_comment);
- insulinDia = (TextView) view.findViewById(R.id.insulin_dia);
- insulinGraph = (ActivityGraph) view.findViewById(R.id.insuling_graph);
-
- updateGUI();
-
- return view;
- }
-
- @Override
- public void onResume() {
- super.onResume();
- updateGUI();
- }
-
- private void updateGUI() {
- insulinName.setText(insulinPlugin.getFriendlyName());
- insulinComment.setText(insulinPlugin.getComment());
- insulinDia.setText(MainApp.sResources.getText(R.string.dia) + " " + Double.toString(insulinPlugin.getDia()) + "h");
- insulinGraph.show(insulinPlugin);
- }
-
-}
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/InsulinOrefCurves/InsulinOrefRapidActingFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/InsulinOrefCurves/InsulinOrefRapidActingFragment.java
deleted file mode 100644
index e30c087d21..0000000000
--- a/app/src/main/java/info/nightscout/androidaps/plugins/InsulinOrefCurves/InsulinOrefRapidActingFragment.java
+++ /dev/null
@@ -1,57 +0,0 @@
-package info.nightscout.androidaps.plugins.InsulinOrefCurves;
-
-import android.os.Bundle;
-import android.support.v4.app.Fragment;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.TextView;
-
-import info.nightscout.androidaps.MainApp;
-import info.nightscout.androidaps.R;
-import info.nightscout.androidaps.plugins.InsulinFastacting.ActivityGraph;
-
-/**
- * Created by adrian on 14/08/17.
- */
-
-public class InsulinOrefRapidActingFragment extends Fragment {
-
- static InsulinOrefRapidActingPlugin insulinPlugin = new InsulinOrefRapidActingPlugin();
-
- static public InsulinOrefRapidActingPlugin getPlugin() {
- return insulinPlugin;
- }
-
- TextView insulinName;
- TextView insulinComment;
- TextView insulinDia;
- ActivityGraph insulinGraph;
-
- public View onCreateView(LayoutInflater inflater, ViewGroup container,
- Bundle savedInstanceState) {
- View view = inflater.inflate(R.layout.insulin_fragment, container, false);
-
- insulinName = (TextView) view.findViewById(R.id.insulin_name);
- insulinComment = (TextView) view.findViewById(R.id.insulin_comment);
- insulinDia = (TextView) view.findViewById(R.id.insulin_dia);
- insulinGraph = (ActivityGraph) view.findViewById(R.id.insuling_graph);
-
- updateGUI();
-
- return view;
- }
-
- @Override
- public void onResume() {
- super.onResume();
- updateGUI();
- }
-
- private void updateGUI() {
- insulinName.setText(insulinPlugin.getFriendlyName());
- insulinComment.setText(insulinPlugin.getComment());
- insulinDia.setText(MainApp.sResources.getText(R.string.dia) + " " + Double.toString(insulinPlugin.getDia()) + "h");
- insulinGraph.show(insulinPlugin);
- }
-}
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/InsulinOrefCurves/InsulinOrefUltraRapidActingFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/InsulinOrefCurves/InsulinOrefUltraRapidActingFragment.java
deleted file mode 100644
index ea05c7f2e7..0000000000
--- a/app/src/main/java/info/nightscout/androidaps/plugins/InsulinOrefCurves/InsulinOrefUltraRapidActingFragment.java
+++ /dev/null
@@ -1,58 +0,0 @@
-package info.nightscout.androidaps.plugins.InsulinOrefCurves;
-
-import android.os.Bundle;
-import android.support.v4.app.Fragment;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.TextView;
-
-import info.nightscout.androidaps.MainApp;
-import info.nightscout.androidaps.R;
-import info.nightscout.androidaps.plugins.InsulinFastacting.ActivityGraph;
-
-/**
- * Created by adrian on 14/08/17.
- */
-
-public class InsulinOrefUltraRapidActingFragment extends Fragment {
-
- static InsulinOrefUltraRapidActingPlugin insulinPlugin = new InsulinOrefUltraRapidActingPlugin();
-
- static public InsulinOrefUltraRapidActingPlugin getPlugin() {
- return insulinPlugin;
- }
-
- TextView insulinName;
- TextView insulinComment;
- TextView insulinDia;
- ActivityGraph insulinGraph;
-
- public View onCreateView(LayoutInflater inflater, ViewGroup container,
- Bundle savedInstanceState) {
- View view = inflater.inflate(R.layout.insulin_fragment, container, false);
-
- insulinName = (TextView) view.findViewById(R.id.insulin_name);
- insulinComment = (TextView) view.findViewById(R.id.insulin_comment);
- insulinDia = (TextView) view.findViewById(R.id.insulin_dia);
- insulinGraph = (ActivityGraph) view.findViewById(R.id.insuling_graph);
-
- updateGUI();
-
- return view;
- }
-
- @Override
- public void onResume() {
- super.onResume();
- updateGUI();
- }
-
- private void updateGUI() {
- insulinName.setText(insulinPlugin.getFriendlyName());
- insulinComment.setText(insulinPlugin.getComment());
- insulinDia.setText(MainApp.sResources.getText(R.string.dia) + " " + Double.toString(insulinPlugin.getDia()) + "h");
- insulinGraph.show(insulinPlugin);
- }
-
-}
diff --git a/app/src/main/res/layout/insulin_fragment.xml b/app/src/main/res/layout/insulin_fragment.xml
index e9a172ae87..88581403dc 100644
--- a/app/src/main/res/layout/insulin_fragment.xml
+++ b/app/src/main/res/layout/insulin_fragment.xml
@@ -3,7 +3,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
- tools:context="info.nightscout.androidaps.plugins.InsulinFastacting.InsulinFastactingFragment">
+ tools:context="info.nightscout.androidaps.plugins.Insulin.InsulinFragment">
-
+ tools:context="info.nightscout.androidaps.plugins.Overview.Dialogs.CalibrationDialog">
+ tools:context="info.nightscout.androidaps.plugins.Actions.dialogs.NewExtendedBolusDialog">
+ tools:context="info.nightscout.androidaps.plugins.Actions.dialogs.NewTempBasalDialog">