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 avgdeltaView;
|
||||||
TextView runningTempView;
|
TextView runningTempView;
|
||||||
TextView baseBasalView;
|
TextView baseBasalView;
|
||||||
|
LinearLayout basalLayout;
|
||||||
TextView activeProfileView;
|
TextView activeProfileView;
|
||||||
TextView iobView;
|
TextView iobView;
|
||||||
TextView apsModeView;
|
TextView apsModeView;
|
||||||
|
@ -146,6 +147,7 @@ public class OverviewFragment extends Fragment {
|
||||||
avgdeltaView = (TextView) view.findViewById(R.id.overview_avgdelta);
|
avgdeltaView = (TextView) view.findViewById(R.id.overview_avgdelta);
|
||||||
runningTempView = (TextView) view.findViewById(R.id.overview_runningtemp);
|
runningTempView = (TextView) view.findViewById(R.id.overview_runningtemp);
|
||||||
baseBasalView = (TextView) view.findViewById(R.id.overview_basebasal);
|
baseBasalView = (TextView) view.findViewById(R.id.overview_basebasal);
|
||||||
|
basalLayout = (LinearLayout) view.findViewById(R.id.overview_basallayout);
|
||||||
activeProfileView = (TextView) view.findViewById(R.id.overview_activeprofile);
|
activeProfileView = (TextView) view.findViewById(R.id.overview_activeprofile);
|
||||||
|
|
||||||
iobView = (TextView) view.findViewById(R.id.overview_iob);
|
iobView = (TextView) view.findViewById(R.id.overview_iob);
|
||||||
|
@ -521,7 +523,13 @@ public class OverviewFragment extends Fragment {
|
||||||
cancelTempLayout.setVisibility(View.GONE);
|
cancelTempLayout.setVisibility(View.GONE);
|
||||||
runningTempView.setVisibility(View.GONE);
|
runningTempView.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (pump.getPumpDescription().isTempBasalCapable) {
|
||||||
|
basalLayout.setVisibility(View.VISIBLE);
|
||||||
baseBasalView.setText(DecimalFormatter.to2Decimal(pump.getBaseBasalRate()) + " U/h");
|
baseBasalView.setText(DecimalFormatter.to2Decimal(pump.getBaseBasalRate()) + " U/h");
|
||||||
|
} else {
|
||||||
|
basalLayout.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
|
||||||
if (profile != null && profile.getActiveProfile() != null)
|
if (profile != null && profile.getActiveProfile() != null)
|
||||||
activeProfileView.setText(profile.getActiveProfile());
|
activeProfileView.setText(profile.getActiveProfile());
|
||||||
|
|
|
@ -118,6 +118,7 @@
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
android:id="@+id/overview_basallayout"
|
||||||
android:gravity="center_horizontal"
|
android:gravity="center_horizontal"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue