show basal line only if pump is tempbasal capable
This commit is contained in:
parent
9edb5c9a66
commit
ef2e7b1a62
2 changed files with 10 additions and 1 deletions
|
@ -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());
|
||||
|
|
|
@ -118,6 +118,7 @@
|
|||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/overview_basallayout"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
|
Loading…
Reference in a new issue