From 7f122f7497504b0945d7c977e3ac23904007bf12 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Fri, 21 Apr 2017 16:13:53 +0200 Subject: [PATCH] show dia in insulin plugin --- .../InsulinFastacting/InsulinFastactingFragment.java | 3 +++ .../InsulinFastactingProlongedFragment.java | 3 +++ app/src/main/res/layout/insulin_fragment.xml | 7 +++++++ 3 files changed, 13 insertions(+) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/InsulinFastacting/InsulinFastactingFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/InsulinFastacting/InsulinFastactingFragment.java index df29240c55..2f62a9a9c3 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/InsulinFastacting/InsulinFastactingFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/InsulinFastacting/InsulinFastactingFragment.java @@ -31,6 +31,8 @@ public class InsulinFastactingFragment extends Fragment implements FragmentBase TextView insulinName; @BindView(R.id.insulin_comment) TextView insulinComment; + @BindView(R.id.insulin_dia) + TextView insulinDia; @BindView(R.id.insulin_activity) ImageView insulinActivity; @@ -42,6 +44,7 @@ public class InsulinFastactingFragment extends Fragment implements FragmentBase insulinName.setText(insulinFastactingPlugin.getFriendlyName()); insulinComment.setText(insulinFastactingPlugin.getComment()); + insulinDia.setText(MainApp.sResources.getText(R.string.dia) + " " + new Double(insulinFastactingPlugin.getDia()).toString() + "h"); insulinActivity.setImageDrawable(MainApp.sResources.getDrawable(insulinFastactingPlugin.getResourcePicture())); return view; diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/InsulinFastactingProlonged/InsulinFastactingProlongedFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/InsulinFastactingProlonged/InsulinFastactingProlongedFragment.java index 648c47a41b..305223bea7 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/InsulinFastactingProlonged/InsulinFastactingProlongedFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/InsulinFastactingProlonged/InsulinFastactingProlongedFragment.java @@ -31,6 +31,8 @@ public class InsulinFastactingProlongedFragment extends Fragment implements Frag TextView insulinName; @BindView(R.id.insulin_comment) TextView insulinComment; + @BindView(R.id.insulin_dia) + TextView insulinDia; @BindView(R.id.insulin_activity) ImageView insulinActivity; @@ -42,6 +44,7 @@ public class InsulinFastactingProlongedFragment extends Fragment implements Frag insulinName.setText(insulinFastactingProlongedPlugin.getFriendlyName()); insulinComment.setText(insulinFastactingProlongedPlugin.getComment()); + insulinDia.setText(MainApp.sResources.getText(R.string.dia) + " " + new Double(insulinFastactingProlongedPlugin.getDia()).toString() + "h"); insulinActivity.setImageDrawable(MainApp.sResources.getDrawable(insulinFastactingProlongedPlugin.getResourcePicture())); return view; diff --git a/app/src/main/res/layout/insulin_fragment.xml b/app/src/main/res/layout/insulin_fragment.xml index 86fccb49c3..0aa2b001b9 100644 --- a/app/src/main/res/layout/insulin_fragment.xml +++ b/app/src/main/res/layout/insulin_fragment.xml @@ -28,6 +28,13 @@ android:layout_margin="10dp" android:textAppearance="?android:attr/textAppearanceMedium" /> + +