From 333b131c1e10bd9f916ee8ca42853955e64258cc Mon Sep 17 00:00:00 2001 From: AdrianLxM Date: Fri, 6 Oct 2017 13:53:55 +0200 Subject: [PATCH 1/3] overview checkboxes cutoff fix --- app/src/main/res/layout/overview_fragment.xml | 30 +++++++++++-------- .../layout/overview_fragment_smallheight.xml | 30 +++++++++++-------- 2 files changed, 36 insertions(+), 24 deletions(-) diff --git a/app/src/main/res/layout/overview_fragment.xml b/app/src/main/res/layout/overview_fragment.xml index 413350d6eb..c5bfe15319 100644 --- a/app/src/main/res/layout/overview_fragment.xml +++ b/app/src/main/res/layout/overview_fragment.xml @@ -244,14 +244,15 @@ android:text="@string/predictionshortlabel" android:textAppearance="?android:attr/textAppearanceSmall" android:textColor="@color/prediction" - android:textStyle="bold" /> + android:textStyle="bold" + android:paddingTop="4dp"/> + android:textStyle="bold" + android:paddingTop="4dp"/> + android:textStyle="bold" + android:paddingTop="4dp"/> + android:textStyle="bold" + android:paddingTop="4dp"/> + android:textStyle="bold" + android:paddingTop="4dp"/> + android:textStyle="bold" + android:paddingTop="4dp"/> + android:layout_marginTop="-5dp" /> diff --git a/app/src/main/res/layout/overview_fragment_smallheight.xml b/app/src/main/res/layout/overview_fragment_smallheight.xml index e1d2338959..c45ca863e2 100644 --- a/app/src/main/res/layout/overview_fragment_smallheight.xml +++ b/app/src/main/res/layout/overview_fragment_smallheight.xml @@ -239,14 +239,15 @@ android:text="@string/predictionshortlabel" android:textAppearance="?android:attr/textAppearanceSmall" android:textColor="@color/prediction" - android:textStyle="bold" /> + android:textStyle="bold" + android:paddingTop="4dp"/> + android:textStyle="bold" + android:paddingTop="4dp"/> + android:textStyle="bold" + android:paddingTop="4dp"/> + android:textStyle="bold" + android:paddingTop="4dp"/> + android:textStyle="bold" + android:paddingTop="4dp"/> + android:textStyle="bold" + android:paddingTop="4dp"/> + android:layout_marginTop="-5dp" /> From 10d273dac881832c452c432130a3aae80a6e01c4 Mon Sep 17 00:00:00 2001 From: AdrianLxM Date: Fri, 6 Oct 2017 15:48:32 +0200 Subject: [PATCH 2/3] checkboxes for NS-Client layouts --- .../res/layout/overview_fragment_nsclient.xml | 30 +++++++++++-------- .../overview_fragment_nsclient_tablet.xml | 30 +++++++++++-------- 2 files changed, 36 insertions(+), 24 deletions(-) diff --git a/app/src/main/res/layout/overview_fragment_nsclient.xml b/app/src/main/res/layout/overview_fragment_nsclient.xml index f42809b4be..1a5771c26e 100644 --- a/app/src/main/res/layout/overview_fragment_nsclient.xml +++ b/app/src/main/res/layout/overview_fragment_nsclient.xml @@ -482,14 +482,15 @@ android:text="@string/predictionshortlabel" android:textAppearance="?android:attr/textAppearanceSmall" android:textColor="@color/prediction" - android:textStyle="bold" /> + android:textStyle="bold" + android:paddingTop="4dp"/> + android:textStyle="bold" + android:paddingTop="4dp"/> + android:textStyle="bold" + android:paddingTop="4dp"/> + android:textStyle="bold" + android:paddingTop="4dp"/> + android:textStyle="bold" + android:paddingTop="4dp"/> + android:textStyle="bold" + android:paddingTop="4dp"/> + android:layout_marginTop="-5dp" /> diff --git a/app/src/main/res/layout/overview_fragment_nsclient_tablet.xml b/app/src/main/res/layout/overview_fragment_nsclient_tablet.xml index 10148057bb..e7ddd35913 100644 --- a/app/src/main/res/layout/overview_fragment_nsclient_tablet.xml +++ b/app/src/main/res/layout/overview_fragment_nsclient_tablet.xml @@ -566,14 +566,15 @@ android:text="@string/predictionshortlabel" android:textAppearance="?android:attr/textAppearanceSmall" android:textColor="@color/prediction" - android:textStyle="bold" /> + android:textStyle="bold" + android:paddingTop="4dp"/> + android:textStyle="bold" + android:paddingTop="4dp"/> + android:textStyle="bold" + android:paddingTop="4dp"/> + android:textStyle="bold" + android:paddingTop="4dp"/> + android:textStyle="bold" + android:paddingTop="4dp"/> + android:textStyle="bold" + android:paddingTop="4dp"/> + android:layout_marginTop="-5dp" /> From 046c28856cb237ae6e961c50fd500bbca4e86f95 Mon Sep 17 00:00:00 2001 From: AdrianLxM Date: Sat, 7 Oct 2017 01:18:28 +0200 Subject: [PATCH 3/3] treatments in config builder --- .../ConfigBuilder/ConfigBuilderFragment.java | 10 ++++++++++ .../res/layout/configbuilder_fragment.xml | 19 +++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/ConfigBuilder/ConfigBuilderFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/ConfigBuilder/ConfigBuilderFragment.java index cb4a1ee265..4c868bcc3f 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/ConfigBuilder/ConfigBuilderFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/ConfigBuilder/ConfigBuilderFragment.java @@ -56,6 +56,8 @@ public class ConfigBuilderFragment extends Fragment { TextView pumpLabel; ListView loopListView; TextView loopLabel; + ListView treatmentsListView; + TextView treatmentsLabel; ListView profileListView; TextView profileLabel; ListView apsListView; @@ -72,6 +74,7 @@ public class ConfigBuilderFragment extends Fragment { PluginCustomAdapter bgsourceDataAdapter = null; PluginCustomAdapter pumpDataAdapter = null; PluginCustomAdapter loopDataAdapter = null; + PluginCustomAdapter treatmentDataAdapter = null; PluginCustomAdapter profileDataAdapter = null; PluginCustomAdapter apsDataAdapter = null; PluginCustomAdapter constraintsDataAdapter = null; @@ -91,6 +94,8 @@ public class ConfigBuilderFragment extends Fragment { pumpLabel = (TextView) view.findViewById(R.id.configbuilder_pumplabel); loopListView = (ListView) view.findViewById(R.id.configbuilder_looplistview); loopLabel = (TextView) view.findViewById(R.id.configbuilder_looplabel); + treatmentsListView = (ListView) view.findViewById(R.id.configbuilder_treatmentslistview); + treatmentsLabel = (TextView) view.findViewById(R.id.configbuilder_treatmentslabel); profileListView = (ListView) view.findViewById(R.id.configbuilder_profilelistview); profileLabel = (TextView) view.findViewById(R.id.configbuilder_profilelabel); apsListView = (ListView) view.findViewById(R.id.configbuilder_apslistview); @@ -148,6 +153,11 @@ public class ConfigBuilderFragment extends Fragment { setListViewHeightBasedOnChildren(loopListView); if (MainApp.getSpecificPluginsVisibleInList(PluginBase.LOOP).size() == 0) loopLabel.setVisibility(View.GONE); + treatmentDataAdapter = new PluginCustomAdapter(getContext(), R.layout.configbuilder_simpleitem, MainApp.getSpecificPluginsVisibleInList(PluginBase.TREATMENT), PluginBase.TREATMENT); + treatmentsListView.setAdapter(treatmentDataAdapter); + setListViewHeightBasedOnChildren(treatmentsListView); + if (MainApp.getSpecificPluginsVisibleInList(PluginBase.TREATMENT).size() == 0) + treatmentsLabel.setVisibility(View.GONE); profileDataAdapter = new PluginCustomAdapter(getContext(), R.layout.configbuilder_simpleitem, MainApp.getSpecificPluginsVisibleInListByInterface(ProfileInterface.class, PluginBase.PROFILE), PluginBase.PROFILE); profileListView.setAdapter(profileDataAdapter); if (MainApp.getSpecificPluginsVisibleInList(PluginBase.PROFILE).size() == 0) diff --git a/app/src/main/res/layout/configbuilder_fragment.xml b/app/src/main/res/layout/configbuilder_fragment.xml index 1af5f05eff..2b2a7ef185 100644 --- a/app/src/main/res/layout/configbuilder_fragment.xml +++ b/app/src/main/res/layout/configbuilder_fragment.xml @@ -196,6 +196,25 @@ android:layout_height="wrap_content" android:background="@color/cardColorBackground" /> + + + +