From 891c5dd4d74bba1a5e519ba29bd5f7e2821a5714 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Thu, 9 Jun 2016 09:21:33 +0200 Subject: [PATCH] show units in profile --- .../ProfileViewer/ProfileViewerFragment.java | 3 +++ app/src/main/res/layout/profileviewer_fragment.xml | 13 +++++++++++++ app/src/main/res/values/strings.xml | 1 + 3 files changed, 17 insertions(+) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/ProfileViewer/ProfileViewerFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/ProfileViewer/ProfileViewerFragment.java index 02fa968d82..ba2218ff28 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/ProfileViewer/ProfileViewerFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/ProfileViewer/ProfileViewerFragment.java @@ -24,6 +24,7 @@ public class ProfileViewerFragment extends Fragment { private static Logger log = LoggerFactory.getLogger(ProfileViewerFragment.class); private static TextView noProfile; + private static TextView units; private static TextView dia; private static TextView activeProfile; private static TextView ic; @@ -53,6 +54,7 @@ public class ProfileViewerFragment extends Fragment { View layout = inflater.inflate(R.layout.profileviewer_fragment, container, false); noProfile = (TextView) layout.findViewById(R.id.profileview_noprofile); + units = (TextView) layout.findViewById(R.id.profileview_units); dia = (TextView) layout.findViewById(R.id.profileview_dia); activeProfile = (TextView) layout.findViewById(R.id.profileview_activeprofile); ic = (TextView) layout.findViewById(R.id.profileview_ic); @@ -77,6 +79,7 @@ public class ProfileViewerFragment extends Fragment { } else { noProfile.setVisibility(View.GONE); } + units.setText(profile.getUnits()); dia.setText(formatNumber2decimalplaces.format(profile.getDia()) + " h"); activeProfile.setText(profile.getActiveProfile()); ic.setText(profile.getIcList()); diff --git a/app/src/main/res/layout/profileviewer_fragment.xml b/app/src/main/res/layout/profileviewer_fragment.xml index 4d3ac26bce..8449263575 100644 --- a/app/src/main/res/layout/profileviewer_fragment.xml +++ b/app/src/main/res/layout/profileviewer_fragment.xml @@ -36,6 +36,19 @@ android:layout_height="wrap_content" android:layout_marginLeft="25dp" /> + + + + U IOB TOTAL + Units: