From 2656e6a12cefa96ad6565de41146b3d02d59706c Mon Sep 17 00:00:00 2001 From: Philoul Date: Thu, 25 Jun 2020 18:16:10 +0200 Subject: [PATCH 1/2] BG Deltas consistency enhancement - Delta after minutes and label right aligned in layout (hard coded for label as it was in OverviewFragment) - Signed delta avg values --- .../general/overview/OverviewFragment.kt | 4 +- .../main/res/layout/overview_info_layout.xml | 52 ++++++++++++++----- 2 files changed, 41 insertions(+), 15 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewFragment.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewFragment.kt index 4afcc52826..2c3a741b0b 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewFragment.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewFragment.kt @@ -572,9 +572,9 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList val glucoseStatus = GlucoseStatus(injector).glucoseStatusData if (glucoseStatus != null) { - overview_delta?.text = "Δ ${Profile.toSignedUnitsString(glucoseStatus.delta, glucoseStatus.delta * Constants.MGDL_TO_MMOLL, units)}" + overview_delta?.text = "${Profile.toSignedUnitsString(glucoseStatus.delta, glucoseStatus.delta * Constants.MGDL_TO_MMOLL, units)}" overview_deltashort?.text = Profile.toSignedUnitsString(glucoseStatus.delta, glucoseStatus.delta * Constants.MGDL_TO_MMOLL, units) - overview_avgdelta?.text = "Δ15m: ${Profile.toUnitsString(glucoseStatus.short_avgdelta, glucoseStatus.short_avgdelta * Constants.MGDL_TO_MMOLL, units)}\nΔ40m: ${Profile.toUnitsString(glucoseStatus.long_avgdelta, glucoseStatus.long_avgdelta * Constants.MGDL_TO_MMOLL, units)}" + overview_avgdelta?.text = "${Profile.toSignedUnitsString(glucoseStatus.short_avgdelta, glucoseStatus.short_avgdelta * Constants.MGDL_TO_MMOLL, units)}\n${Profile.toSignedUnitsString(glucoseStatus.long_avgdelta, glucoseStatus.long_avgdelta * Constants.MGDL_TO_MMOLL, units)}" } else { overview_delta?.text = "Δ " + resourceHelper.gs(R.string.notavailable) overview_deltashort?.text = "---" diff --git a/app/src/main/res/layout/overview_info_layout.xml b/app/src/main/res/layout/overview_info_layout.xml index 9794abeaff..5bea227071 100644 --- a/app/src/main/res/layout/overview_info_layout.xml +++ b/app/src/main/res/layout/overview_info_layout.xml @@ -49,20 +49,46 @@ android:text="n/a" android:textAppearance="@style/TextAppearance.AppCompat.Small" /> - + - + + + + + + + + + + + From 799d4205dd9e2219812dad2f7279d5e7c7fe093b Mon Sep 17 00:00:00 2001 From: Philoul Date: Sat, 27 Jun 2020 01:42:39 +0200 Subject: [PATCH 2/2] Right align label and right align values --- .../main/res/layout/overview_info_layout.xml | 68 +++++++++++-------- 1 file changed, 41 insertions(+), 27 deletions(-) diff --git a/app/src/main/res/layout/overview_info_layout.xml b/app/src/main/res/layout/overview_info_layout.xml index 5bea227071..223ad259c1 100644 --- a/app/src/main/res/layout/overview_info_layout.xml +++ b/app/src/main/res/layout/overview_info_layout.xml @@ -54,40 +54,54 @@ android:layout_height="wrap_content" android:orientation="horizontal"> - - - - + android:orientation="vertical"> - + - + - + + + android:orientation="vertical"> + + + + + + +