From a746b0fe051306034d13e4643dbc893110ae27cc Mon Sep 17 00:00:00 2001 From: osodebailar Date: Wed, 25 Dec 2019 16:04:52 +0100 Subject: [PATCH] add average delta again and refactor NS Client --- .../general/overview/OverviewFragment.java | 3 +- .../careportal_stats_fragment_short.xml | 184 +++---- app/src/main/res/layout/overview_fragment.xml | 12 +- .../res/layout/overview_fragment_nsclient.xml | 503 +++++++++--------- .../layout/overview_fragment_smallheight.xml | 12 +- 5 files changed, 354 insertions(+), 360 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewFragment.java index 2891bc7f23..f317310500 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewFragment.java @@ -237,8 +237,7 @@ public class OverviewFragment extends Fragment implements View.OnClickListener, timeAgoShortView = (TextView) view.findViewById(R.id.overview_timeagoshort); deltaView = (TextView) view.findViewById(R.id.overview_delta); deltaShortView = (TextView) view.findViewById(R.id.overview_deltashort); - // TODO: avgdeltaView in Expertmode - //avgdeltaView = (TextView) view.findViewById(R.id.overview_avgdelta); + avgdeltaView = (TextView) view.findViewById(R.id.overview_avgdelta); baseBasalView = (TextView) view.findViewById(R.id.overview_basebasal); extendedBolusView = (TextView) view.findViewById(R.id.overview_extendedbolus); activeProfileView = (TextView) view.findViewById(R.id.overview_activeprofile); diff --git a/app/src/main/res/layout/careportal_stats_fragment_short.xml b/app/src/main/res/layout/careportal_stats_fragment_short.xml index 482d4321cb..630b5cff5f 100644 --- a/app/src/main/res/layout/careportal_stats_fragment_short.xml +++ b/app/src/main/res/layout/careportal_stats_fragment_short.xml @@ -1,156 +1,106 @@ - - - - + - - - - - - - - - + - - - - - - - - - + - - - - - - - - - + - - - - + \ No newline at end of file diff --git a/app/src/main/res/layout/overview_fragment.xml b/app/src/main/res/layout/overview_fragment.xml index 3cff754c07..01d279b925 100644 --- a/app/src/main/res/layout/overview_fragment.xml +++ b/app/src/main/res/layout/overview_fragment.xml @@ -156,7 +156,7 @@ android:layout_marginTop="-2dp" android:paddingStart="2dp" android:layout_weight="0.5" - android:textSize="16sp" /> + android:textSize="14sp" /> + android:textSize="14sp" /> + + diff --git a/app/src/main/res/layout/overview_fragment_nsclient.xml b/app/src/main/res/layout/overview_fragment_nsclient.xml index ddc6801651..2bb210d78a 100644 --- a/app/src/main/res/layout/overview_fragment_nsclient.xml +++ b/app/src/main/res/layout/overview_fragment_nsclient.xml @@ -5,9 +5,17 @@ android:layout_height="match_parent" tools:context=".plugins.general.overview.OverviewFragment"> + + + android:layout_height="match_parent" + android:layout_above="@+id/overview_buttons" + android:fillViewport="false"> - - - - - - - - - - - - - - - - + android:layout_height="wrap_content" + android:orientation="horizontal"> - + android:layout_gravity="center_vertical" + android:layout_marginStart="6dp" + android:text="00.0" + android:textSize="42sp" + android:textStyle="bold" /> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + android:layout_gravity="center_vertical" + android:layout_marginTop="-5dp" + android:layout_marginEnd="4dp" + android:paddingStart="-2dp" + android:paddingEnd="0dp" + android:text="→" + android:textSize="28sp" + android:textStyle="bold" /> + + + + + + + + - + android:orientation="horizontal"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -375,39 +392,43 @@ android:layout_height="wrap_content" android:orientation="horizontal"> + + - + - - - + + + + + + + - - - - - + + diff --git a/app/src/main/res/layout/overview_fragment_smallheight.xml b/app/src/main/res/layout/overview_fragment_smallheight.xml index f8eae568c3..55ca13a291 100644 --- a/app/src/main/res/layout/overview_fragment_smallheight.xml +++ b/app/src/main/res/layout/overview_fragment_smallheight.xml @@ -156,7 +156,7 @@ android:layout_marginTop="-2dp" android:paddingStart="2dp" android:layout_weight="0.5" - android:textSize="16sp" /> + android:textSize="14sp" /> + android:textSize="14sp" /> + +