From 4dbb20b8c560ef9a09d2427d5528ac6cec777379 Mon Sep 17 00:00:00 2001 From: AdrianLxM Date: Sun, 13 Nov 2016 03:32:45 +0100 Subject: [PATCH] CPP small redesign --- .../CircadianPercentageProfileFragment.java | 14 +- .../circadianpercentageprofile_fragment.xml | 272 ++++++++++-------- 2 files changed, 153 insertions(+), 133 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/CircadianPercentageProfile/CircadianPercentageProfileFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/CircadianPercentageProfile/CircadianPercentageProfileFragment.java index 2a65e77295..7a1b5ab1c4 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/CircadianPercentageProfile/CircadianPercentageProfileFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/CircadianPercentageProfile/CircadianPercentageProfileFragment.java @@ -37,6 +37,8 @@ public class CircadianPercentageProfileFragment extends Fragment implements Frag EditText percentageView; EditText timeshiftView; TextView profileView; + TextView baseprofileView; + @Override @@ -52,7 +54,7 @@ public class CircadianPercentageProfileFragment extends Fragment implements Frag percentageView = (EditText) layout.findViewById(R.id.circadianpercentageprofile_percentage); timeshiftView = (EditText) layout.findViewById(R.id.circadianpercentageprofile_timeshift); profileView = (TextView) layout.findViewById(R.id.circadianpercentageprofile_profileview); - + baseprofileView = (TextView) layout.findViewById(R.id.circadianpercentageprofile_baseprofileview); mgdlView.setChecked(circadianPercentageProfilePlugin.mgdl); mmolView.setChecked(circadianPercentageProfilePlugin.mmol); @@ -125,11 +127,11 @@ public class CircadianPercentageProfileFragment extends Fragment implements Frag profileView.append("Basal: " + circadianPercentageProfilePlugin.basalString() + "\n"); profileView.append("IC: " + circadianPercentageProfilePlugin.icString() + "\n"); profileView.append("ISF: " + circadianPercentageProfilePlugin.isfString() + "\n"); - profileView.append("\n"); - profileView.append("Base Profile:\n"); - profileView.append("Basal: " + circadianPercentageProfilePlugin.baseBasalString() + "\n"); - profileView.append("IC: " + circadianPercentageProfilePlugin.baseIcString() + "\n"); - profileView.append("ISF: " + circadianPercentageProfilePlugin.baseIsfString() + "\n"); + + baseprofileView.setText("Base Profile:\n"); + baseprofileView.append("Basal: " + circadianPercentageProfilePlugin.baseBasalString() + "\n"); + baseprofileView.append("IC: " + circadianPercentageProfilePlugin.baseIcString() + "\n"); + baseprofileView.append("ISF: " + circadianPercentageProfilePlugin.baseIsfString() + "\n"); } } diff --git a/app/src/main/res/layout/circadianpercentageprofile_fragment.xml b/app/src/main/res/layout/circadianpercentageprofile_fragment.xml index f0331c5423..6d6b4263f5 100644 --- a/app/src/main/res/layout/circadianpercentageprofile_fragment.xml +++ b/app/src/main/res/layout/circadianpercentageprofile_fragment.xml @@ -3,172 +3,190 @@ android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".plugins.CircadianPercentageProfile.CircadianPercentageProfileFragment"> + - - - - + android:orientation="vertical"> - + android:layout_height="wrap_content" + android:layout_marginLeft="10dp" + android:layout_marginRight="10dp" + android:background="@color/cardColorBackground" + android:text="Profile View" + android:textAppearance="?android:attr/textAppearanceSmall" /> - + + + android:orientation="horizontal" + android:layout_gravity="center_horizontal" + android:background="@drawable/pillborder" + android:padding="5dp"> + + + + - + + + android:orientation="horizontal" + android:layout_gravity="center_horizontal" + android:background="@drawable/pillborder" + android:padding="5dp"> - + - + - + + + + + android:layout_height="wrap_content" + android:layout_marginLeft="10dp" + android:layout_marginRight="10dp" + android:background="@color/cardColorBackground" + android:text="Profile View" + android:textAppearance="?android:attr/textAppearanceSmall" /> - - - - - + android:layout_height="wrap_content" + android:layout_gravity="left|top"> - + - - + - + - + - + - + - - + + - + - + - - - + + - + - - + - + + + + + + +