disable entering basals in profiles only if pump is not tempbasal capable
This commit is contained in:
parent
ef2e7b1a62
commit
4408146f23
5 changed files with 23 additions and 0 deletions
|
@ -29,6 +29,7 @@ import info.nightscout.androidaps.MainApp;
|
|||
import info.nightscout.androidaps.R;
|
||||
import info.nightscout.androidaps.events.EventInitializationChanged;
|
||||
import info.nightscout.androidaps.interfaces.FragmentBase;
|
||||
import info.nightscout.androidaps.interfaces.PumpInterface;
|
||||
import info.nightscout.androidaps.plugins.Careportal.Dialogs.NewNSTreatmentDialog;
|
||||
import info.nightscout.androidaps.plugins.Careportal.OptionsToShow;
|
||||
import info.nightscout.utils.DecimalFormatter;
|
||||
|
@ -55,6 +56,7 @@ public class CircadianPercentageProfileFragment extends Fragment implements Frag
|
|||
TextView profileView;
|
||||
TextView baseprofileIC;
|
||||
TextView baseprofileBasal;
|
||||
LinearLayout baseprofileBasalLayout;
|
||||
TextView baseprofileISF;
|
||||
Button profileswitchButton;
|
||||
ImageView percentageIcon;
|
||||
|
@ -79,6 +81,7 @@ public class CircadianPercentageProfileFragment extends Fragment implements Frag
|
|||
timeshiftView = (EditText) layout.findViewById(R.id.circadianpercentageprofile_timeshift);
|
||||
profileView = (TextView) layout.findViewById(R.id.circadianpercentageprofile_profileview);
|
||||
baseprofileBasal = (TextView) layout.findViewById(R.id.circadianpercentageprofile_baseprofilebasal);
|
||||
baseprofileBasalLayout = (LinearLayout) layout.findViewById(R.id.circadianpercentageprofile_baseprofilebasal_layout);
|
||||
baseprofileIC = (TextView) layout.findViewById(R.id.circadianpercentageprofile_baseprofileic);
|
||||
baseprofileISF = (TextView) layout.findViewById(R.id.circadianpercentageprofile_baseprofileisf);
|
||||
percentageIcon = (ImageView) layout.findViewById(R.id.circadianpercentageprofile_percentageicon);
|
||||
|
@ -89,6 +92,11 @@ public class CircadianPercentageProfileFragment extends Fragment implements Frag
|
|||
iceditIcon = (ImageView) layout.findViewById(R.id.circadianpercentageprofile_icedit);
|
||||
isfeditIcon = (ImageView) layout.findViewById(R.id.circadianpercentageprofile_isfedit);
|
||||
|
||||
PumpInterface pump = MainApp.getConfigBuilder();
|
||||
if (!pump.getPumpDescription().isTempBasalCapable) {
|
||||
layout.findViewById(R.id.circadianpercentageprofile_baseprofilebasal_layout).setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
|
||||
mgdlView.setChecked(circadianPercentageProfilePlugin.mgdl);
|
||||
mmolView.setChecked(circadianPercentageProfilePlugin.mmol);
|
||||
|
|
|
@ -25,6 +25,7 @@ import info.nightscout.androidaps.MainApp;
|
|||
import info.nightscout.androidaps.R;
|
||||
import info.nightscout.androidaps.events.EventInitializationChanged;
|
||||
import info.nightscout.androidaps.interfaces.FragmentBase;
|
||||
import info.nightscout.androidaps.interfaces.PumpInterface;
|
||||
import info.nightscout.androidaps.plugins.Careportal.Dialogs.NewNSTreatmentDialog;
|
||||
import info.nightscout.androidaps.plugins.Careportal.OptionsToShow;
|
||||
import info.nightscout.utils.SafeParse;
|
||||
|
@ -70,6 +71,11 @@ public class LocalProfileFragment extends Fragment implements FragmentBase {
|
|||
targetView = new TimeListEdit(getContext(), layout, R.id.localprofile_target, MainApp.sResources.getString(R.string.nsprofileview_target_label), getPlugin().targetLow, getPlugin().targetHigh, new DecimalFormat("0.0"), save);
|
||||
profileswitchButton = (Button) layout.findViewById(R.id.localprofile_profileswitch);
|
||||
|
||||
PumpInterface pump = MainApp.getConfigBuilder();
|
||||
if (!pump.getPumpDescription().isTempBasalCapable) {
|
||||
layout.findViewById(R.id.localprofile_basal).setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
onStatusEvent(null);
|
||||
|
||||
mgdlView.setChecked(localProfilePlugin.mgdl);
|
||||
|
|
|
@ -26,6 +26,7 @@ import info.nightscout.androidaps.MainApp;
|
|||
import info.nightscout.androidaps.R;
|
||||
import info.nightscout.androidaps.events.EventInitializationChanged;
|
||||
import info.nightscout.androidaps.interfaces.FragmentBase;
|
||||
import info.nightscout.androidaps.interfaces.PumpInterface;
|
||||
import info.nightscout.androidaps.plugins.Careportal.Dialogs.NewNSTreatmentDialog;
|
||||
import info.nightscout.androidaps.plugins.Careportal.OptionsToShow;
|
||||
import info.nightscout.androidaps.plugins.Overview.events.EventNewNotification;
|
||||
|
@ -68,6 +69,12 @@ public class SimpleProfileFragment extends Fragment implements FragmentBase {
|
|||
targethighView = (EditText) layout.findViewById(R.id.simpleprofile_targethigh);
|
||||
profileswitchButton = (Button) layout.findViewById(R.id.simpleprofile_profileswitch);
|
||||
|
||||
PumpInterface pump = MainApp.getConfigBuilder();
|
||||
if (!pump.getPumpDescription().isTempBasalCapable) {
|
||||
layout.findViewById(R.id.simpleprofile_basalrate).setVisibility(View.GONE);
|
||||
layout.findViewById(R.id.simpleprofile_basalrate_label).setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
onStatusEvent(null);
|
||||
|
||||
mgdlView.setChecked(simpleProfilePlugin.mgdl);
|
||||
|
|
|
@ -110,6 +110,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:background="@color/cardColorBackground"
|
||||
android:orientation="horizontal"
|
||||
android:id="@+id/circadianpercentageprofile_baseprofilebasal_layout"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall">
|
||||
|
||||
<TextView
|
||||
|
|
|
@ -89,6 +89,7 @@
|
|||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/simpleprofile_basalrate_label"
|
||||
android:text="@string/basal_rate"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||
|
||||
|
|
Loading…
Reference in a new issue