Insulin fragments consolidation
This commit is contained in:
parent
c312b51fcf
commit
db952759e1
19 changed files with 75 additions and 273 deletions
|
@ -30,11 +30,11 @@ import info.nightscout.androidaps.plugins.ConfigBuilder.ConfigBuilderFragment;
|
||||||
import info.nightscout.androidaps.plugins.ConfigBuilder.ConfigBuilderPlugin;
|
import info.nightscout.androidaps.plugins.ConfigBuilder.ConfigBuilderPlugin;
|
||||||
import info.nightscout.androidaps.plugins.ConstraintsObjectives.ObjectivesFragment;
|
import info.nightscout.androidaps.plugins.ConstraintsObjectives.ObjectivesFragment;
|
||||||
import info.nightscout.androidaps.plugins.ConstraintsSafety.SafetyPlugin;
|
import info.nightscout.androidaps.plugins.ConstraintsSafety.SafetyPlugin;
|
||||||
import info.nightscout.androidaps.plugins.InsulinFastacting.InsulinFastactingFragment;
|
import info.nightscout.androidaps.plugins.Insulin.InsulinFastactingPlugin;
|
||||||
import info.nightscout.androidaps.plugins.InsulinFastactingProlonged.InsulinFastactingProlongedFragment;
|
import info.nightscout.androidaps.plugins.Insulin.InsulinFastactingProlongedPlugin;
|
||||||
import info.nightscout.androidaps.plugins.InsulinOrefCurves.InsulinOrefFreePeakFragment;
|
import info.nightscout.androidaps.plugins.Insulin.InsulinOrefFreePeakPlugin;
|
||||||
import info.nightscout.androidaps.plugins.InsulinOrefCurves.InsulinOrefRapidActingFragment;
|
import info.nightscout.androidaps.plugins.Insulin.InsulinOrefRapidActingPlugin;
|
||||||
import info.nightscout.androidaps.plugins.InsulinOrefCurves.InsulinOrefUltraRapidActingFragment;
|
import info.nightscout.androidaps.plugins.Insulin.InsulinOrefUltraRapidActingPlugin;
|
||||||
import info.nightscout.androidaps.plugins.IobCobCalculator.IobCobCalculatorPlugin;
|
import info.nightscout.androidaps.plugins.IobCobCalculator.IobCobCalculatorPlugin;
|
||||||
import info.nightscout.androidaps.plugins.Loop.LoopFragment;
|
import info.nightscout.androidaps.plugins.Loop.LoopFragment;
|
||||||
import info.nightscout.androidaps.plugins.NSClientInternal.NSClientInternalFragment;
|
import info.nightscout.androidaps.plugins.NSClientInternal.NSClientInternalFragment;
|
||||||
|
@ -112,11 +112,11 @@ public class MainApp extends Application {
|
||||||
pluginsList.add(OverviewFragment.getPlugin());
|
pluginsList.add(OverviewFragment.getPlugin());
|
||||||
pluginsList.add(IobCobCalculatorPlugin.getPlugin());
|
pluginsList.add(IobCobCalculatorPlugin.getPlugin());
|
||||||
if (Config.ACTION) pluginsList.add(ActionsFragment.getPlugin());
|
if (Config.ACTION) pluginsList.add(ActionsFragment.getPlugin());
|
||||||
pluginsList.add(InsulinFastactingFragment.getPlugin());
|
pluginsList.add(InsulinFastactingPlugin.getPlugin());
|
||||||
pluginsList.add(InsulinFastactingProlongedFragment.getPlugin());
|
pluginsList.add(InsulinFastactingProlongedPlugin.getPlugin());
|
||||||
pluginsList.add(InsulinOrefRapidActingFragment.getPlugin());
|
pluginsList.add(InsulinOrefRapidActingPlugin.getPlugin());
|
||||||
pluginsList.add(InsulinOrefUltraRapidActingFragment.getPlugin());
|
pluginsList.add(InsulinOrefUltraRapidActingPlugin.getPlugin());
|
||||||
pluginsList.add(InsulinOrefFreePeakFragment.getPlugin());
|
pluginsList.add(InsulinOrefFreePeakPlugin.getPlugin());
|
||||||
pluginsList.add(SensitivityOref0Plugin.getPlugin());
|
pluginsList.add(SensitivityOref0Plugin.getPlugin());
|
||||||
pluginsList.add(SensitivityAAPSPlugin.getPlugin());
|
pluginsList.add(SensitivityAAPSPlugin.getPlugin());
|
||||||
pluginsList.add(SensitivityWeightedAveragePlugin.getPlugin());
|
pluginsList.add(SensitivityWeightedAveragePlugin.getPlugin());
|
||||||
|
|
|
@ -14,7 +14,7 @@ import android.preference.PreferenceManager;
|
||||||
import info.nightscout.androidaps.events.EventPreferenceChange;
|
import info.nightscout.androidaps.events.EventPreferenceChange;
|
||||||
import info.nightscout.androidaps.events.EventRefreshGui;
|
import info.nightscout.androidaps.events.EventRefreshGui;
|
||||||
import info.nightscout.androidaps.interfaces.PluginBase;
|
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.BluetoothDevicePreference;
|
||||||
import info.nightscout.androidaps.plugins.PumpDanaR.DanaRPlugin;
|
import info.nightscout.androidaps.plugins.PumpDanaR.DanaRPlugin;
|
||||||
import info.nightscout.androidaps.plugins.PumpDanaRKorean.DanaRKoreanPlugin;
|
import info.nightscout.androidaps.plugins.PumpDanaRKorean.DanaRKoreanPlugin;
|
||||||
|
|
|
@ -4,7 +4,6 @@ package info.nightscout.androidaps.plugins.ConfigBuilder;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.v4.app.Fragment;
|
import android.support.v4.app.Fragment;
|
||||||
import android.util.DisplayMetrics;
|
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
@ -21,7 +20,6 @@ import com.crashlytics.android.answers.CustomEvent;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
import info.nightscout.androidaps.Constants;
|
|
||||||
import info.nightscout.androidaps.MainApp;
|
import info.nightscout.androidaps.MainApp;
|
||||||
import info.nightscout.androidaps.R;
|
import info.nightscout.androidaps.R;
|
||||||
import info.nightscout.androidaps.events.EventConfigBuilderChange;
|
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.ProfileInterface;
|
||||||
import info.nightscout.androidaps.interfaces.PumpInterface;
|
import info.nightscout.androidaps.interfaces.PumpInterface;
|
||||||
import info.nightscout.androidaps.interfaces.SensitivityInterface;
|
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.ProfileNS.NSProfilePlugin;
|
||||||
import info.nightscout.androidaps.plugins.PumpVirtual.VirtualPumpPlugin;
|
import info.nightscout.androidaps.plugins.PumpVirtual.VirtualPumpPlugin;
|
||||||
import info.nightscout.androidaps.plugins.SensitivityOref0.SensitivityOref0Plugin;
|
import info.nightscout.androidaps.plugins.SensitivityOref0.SensitivityOref0Plugin;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package info.nightscout.androidaps.plugins.InsulinFastacting;
|
package info.nightscout.androidaps.plugins.Insulin;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
|
@ -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.Constants;
|
||||||
import info.nightscout.androidaps.MainApp;
|
import info.nightscout.androidaps.MainApp;
|
||||||
|
@ -17,6 +17,14 @@ public class InsulinFastactingPlugin implements PluginBase, InsulinInterface {
|
||||||
private static boolean fragmentEnabled = true;
|
private static boolean fragmentEnabled = true;
|
||||||
private static boolean fragmentVisible = false;
|
private static boolean fragmentVisible = false;
|
||||||
|
|
||||||
|
private static InsulinFastactingPlugin plugin = null;
|
||||||
|
|
||||||
|
public static InsulinFastactingPlugin getPlugin() {
|
||||||
|
if (plugin == null)
|
||||||
|
plugin = new InsulinFastactingPlugin();
|
||||||
|
return plugin;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getType() {
|
public int getType() {
|
||||||
return INSULIN;
|
return INSULIN;
|
||||||
|
@ -24,7 +32,7 @@ public class InsulinFastactingPlugin implements PluginBase, InsulinInterface {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getFragmentClass() {
|
public String getFragmentClass() {
|
||||||
return InsulinFastactingFragment.class.getName();
|
return InsulinFragment.class.getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
|
@ -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.Constants;
|
||||||
import info.nightscout.androidaps.MainApp;
|
import info.nightscout.androidaps.MainApp;
|
||||||
|
@ -17,6 +17,14 @@ public class InsulinFastactingProlongedPlugin implements PluginBase, InsulinInte
|
||||||
private static boolean fragmentEnabled = false;
|
private static boolean fragmentEnabled = false;
|
||||||
private static boolean fragmentVisible = false;
|
private static boolean fragmentVisible = false;
|
||||||
|
|
||||||
|
private static InsulinFastactingProlongedPlugin plugin = null;
|
||||||
|
|
||||||
|
public static InsulinFastactingProlongedPlugin getPlugin() {
|
||||||
|
if (plugin == null)
|
||||||
|
plugin = new InsulinFastactingProlongedPlugin();
|
||||||
|
return plugin;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getType() {
|
public int getType() {
|
||||||
return INSULIN;
|
return INSULIN;
|
||||||
|
@ -24,7 +32,7 @@ public class InsulinFastactingProlongedPlugin implements PluginBase, InsulinInte
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getFragmentClass() {
|
public String getFragmentClass() {
|
||||||
return InsulinFastactingProlongedFragment.class.getName();
|
return InsulinFragment.class.getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
|
@ -1,4 +1,4 @@
|
||||||
package info.nightscout.androidaps.plugins.InsulinFastacting;
|
package info.nightscout.androidaps.plugins.Insulin;
|
||||||
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.v4.app.Fragment;
|
import android.support.v4.app.Fragment;
|
||||||
|
@ -14,13 +14,7 @@ import info.nightscout.androidaps.R;
|
||||||
* Created by mike on 17.04.2017.
|
* Created by mike on 17.04.2017.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class InsulinFastactingFragment extends Fragment {
|
public class InsulinFragment extends Fragment {
|
||||||
static InsulinFastactingPlugin insulinFastactingPlugin = new InsulinFastactingPlugin();
|
|
||||||
|
|
||||||
static public InsulinFastactingPlugin getPlugin() {
|
|
||||||
return insulinFastactingPlugin;
|
|
||||||
}
|
|
||||||
|
|
||||||
TextView insulinName;
|
TextView insulinName;
|
||||||
TextView insulinComment;
|
TextView insulinComment;
|
||||||
TextView insulinDia;
|
TextView insulinDia;
|
||||||
|
@ -47,10 +41,10 @@ public class InsulinFastactingFragment extends Fragment {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateGUI() {
|
private void updateGUI() {
|
||||||
insulinName.setText(insulinFastactingPlugin.getFriendlyName());
|
insulinName.setText(MainApp.getConfigBuilder().getActiveInsulin().getFriendlyName());
|
||||||
insulinComment.setText(insulinFastactingPlugin.getComment());
|
insulinComment.setText(MainApp.getConfigBuilder().getActiveInsulin().getComment());
|
||||||
insulinDia.setText(MainApp.sResources.getText(R.string.dia) + " " + Double.toString(insulinFastactingPlugin.getDia()) + "h");
|
insulinDia.setText(MainApp.sResources.getText(R.string.dia) + " " + Double.toString(MainApp.getConfigBuilder().getActiveInsulin().getDia()) + "h");
|
||||||
insulinGraph.show(insulinFastactingPlugin);
|
insulinGraph.show(MainApp.getConfigBuilder().getActiveInsulin());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -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.Constants;
|
||||||
import info.nightscout.androidaps.MainApp;
|
import info.nightscout.androidaps.MainApp;
|
|
@ -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.MainApp;
|
||||||
import info.nightscout.androidaps.R;
|
import info.nightscout.androidaps.R;
|
||||||
|
@ -13,6 +13,14 @@ public class InsulinOrefFreePeakPlugin extends InsulinOrefBasePlugin {
|
||||||
private static boolean fragmentEnabled = false;
|
private static boolean fragmentEnabled = false;
|
||||||
private static boolean fragmentVisible = 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;
|
public static final int DEFAULT_PEAK = 75;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -27,7 +35,7 @@ public class InsulinOrefFreePeakPlugin extends InsulinOrefBasePlugin {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getFragmentClass() {
|
public String getFragmentClass() {
|
||||||
return InsulinOrefFreePeakFragment.class.getName();
|
return InsulinFragment.class.getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
|
@ -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.MainApp;
|
||||||
import info.nightscout.androidaps.R;
|
import info.nightscout.androidaps.R;
|
||||||
|
@ -12,6 +12,14 @@ public class InsulinOrefRapidActingPlugin extends InsulinOrefBasePlugin {
|
||||||
private static boolean fragmentEnabled = false;
|
private static boolean fragmentEnabled = false;
|
||||||
private static boolean fragmentVisible = 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;
|
public static final int PEAK = 75;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -26,7 +34,7 @@ public class InsulinOrefRapidActingPlugin extends InsulinOrefBasePlugin {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getFragmentClass() {
|
public String getFragmentClass() {
|
||||||
return InsulinOrefRapidActingFragment.class.getName();
|
return InsulinFragment.class.getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
|
@ -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.MainApp;
|
||||||
import info.nightscout.androidaps.R;
|
import info.nightscout.androidaps.R;
|
||||||
|
@ -12,6 +12,14 @@ public class InsulinOrefUltraRapidActingPlugin extends InsulinOrefBasePlugin {
|
||||||
private static boolean fragmentEnabled = false;
|
private static boolean fragmentEnabled = false;
|
||||||
private static boolean fragmentVisible = 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;
|
public static final int PEAK = 55;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -26,7 +34,7 @@ public class InsulinOrefUltraRapidActingPlugin extends InsulinOrefBasePlugin {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getFragmentClass() {
|
public String getFragmentClass() {
|
||||||
return InsulinOrefUltraRapidActingFragment.class.getName();
|
return InsulinFragment.class.getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
|
@ -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);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -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);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -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);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -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);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -3,7 +3,7 @@
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:context="info.nightscout.androidaps.plugins.InsulinFastacting.InsulinFastactingFragment">
|
tools:context="info.nightscout.androidaps.plugins.Insulin.InsulinFragment">
|
||||||
|
|
||||||
<ScrollView
|
<ScrollView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -35,7 +35,7 @@
|
||||||
android:layout_margin="10dp"
|
android:layout_margin="10dp"
|
||||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||||
|
|
||||||
<info.nightscout.androidaps.plugins.InsulinFastacting.ActivityGraph
|
<info.nightscout.androidaps.plugins.Insulin.ActivityGraph
|
||||||
android:id="@+id/insuling_graph"
|
android:id="@+id/insuling_graph"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_margin="20dp"
|
android:layout_margin="20dp"
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:context="info.nightscout.androidaps.plugins.InsulinFastacting.InsulinFastactingFragment">
|
tools:context="info.nightscout.androidaps.plugins.Overview.Dialogs.CalibrationDialog">
|
||||||
|
|
||||||
<ScrollView
|
<ScrollView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:context="info.nightscout.androidaps.plugins.InsulinFastacting.InsulinFastactingFragment">
|
tools:context="info.nightscout.androidaps.plugins.Actions.dialogs.NewExtendedBolusDialog">
|
||||||
|
|
||||||
<ScrollView
|
<ScrollView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:context="info.nightscout.androidaps.plugins.InsulinFastacting.InsulinFastactingFragment">
|
tools:context="info.nightscout.androidaps.plugins.Actions.dialogs.NewTempBasalDialog">
|
||||||
|
|
||||||
<ScrollView
|
<ScrollView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
Loading…
Reference in a new issue