From ef2e7b1a62939d0587e1e2bafbe32a67aeb3c6d3 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Sun, 1 Jan 2017 14:19:35 +0100 Subject: [PATCH] show basal line only if pump is tempbasal capable --- .../androidaps/plugins/Overview/OverviewFragment.java | 10 +++++++++- app/src/main/res/layout/overview_fragment.xml | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/Overview/OverviewFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/Overview/OverviewFragment.java index 2b9ee97d95..5cfd090a0c 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/Overview/OverviewFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/Overview/OverviewFragment.java @@ -101,6 +101,7 @@ public class OverviewFragment extends Fragment { TextView avgdeltaView; TextView runningTempView; TextView baseBasalView; + LinearLayout basalLayout; TextView activeProfileView; TextView iobView; TextView apsModeView; @@ -146,6 +147,7 @@ public class OverviewFragment extends Fragment { avgdeltaView = (TextView) view.findViewById(R.id.overview_avgdelta); runningTempView = (TextView) view.findViewById(R.id.overview_runningtemp); baseBasalView = (TextView) view.findViewById(R.id.overview_basebasal); + basalLayout = (LinearLayout) view.findViewById(R.id.overview_basallayout); activeProfileView = (TextView) view.findViewById(R.id.overview_activeprofile); iobView = (TextView) view.findViewById(R.id.overview_iob); @@ -521,7 +523,13 @@ public class OverviewFragment extends Fragment { cancelTempLayout.setVisibility(View.GONE); runningTempView.setVisibility(View.GONE); } - baseBasalView.setText(DecimalFormatter.to2Decimal(pump.getBaseBasalRate()) + " U/h"); + + if (pump.getPumpDescription().isTempBasalCapable) { + basalLayout.setVisibility(View.VISIBLE); + baseBasalView.setText(DecimalFormatter.to2Decimal(pump.getBaseBasalRate()) + " U/h"); + } else { + basalLayout.setVisibility(View.GONE); + } if (profile != null && profile.getActiveProfile() != null) activeProfileView.setText(profile.getActiveProfile()); diff --git a/app/src/main/res/layout/overview_fragment.xml b/app/src/main/res/layout/overview_fragment.xml index 517eae9577..12c183d9e8 100644 --- a/app/src/main/res/layout/overview_fragment.xml +++ b/app/src/main/res/layout/overview_fragment.xml @@ -118,6 +118,7 @@