diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/CircadianPercentageProfile/CircadianPercentageProfileFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/CircadianPercentageProfile/CircadianPercentageProfileFragment.java index 0bf490abb6..9fd678e0d3 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/CircadianPercentageProfile/CircadianPercentageProfileFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/CircadianPercentageProfile/CircadianPercentageProfileFragment.java @@ -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); diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/LocalProfile/LocalProfileFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/LocalProfile/LocalProfileFragment.java index 401344d4df..cc891eb98a 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/LocalProfile/LocalProfileFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/LocalProfile/LocalProfileFragment.java @@ -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); diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/SimpleProfile/SimpleProfileFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/SimpleProfile/SimpleProfileFragment.java index 1d0381ce3b..22e293a023 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/SimpleProfile/SimpleProfileFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/SimpleProfile/SimpleProfileFragment.java @@ -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); diff --git a/app/src/main/res/layout/circadianpercentageprofile_fragment.xml b/app/src/main/res/layout/circadianpercentageprofile_fragment.xml index da2a23b4cd..db5067d881 100644 --- a/app/src/main/res/layout/circadianpercentageprofile_fragment.xml +++ b/app/src/main/res/layout/circadianpercentageprofile_fragment.xml @@ -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">