Merge remote-tracking branch 'origin/dev' into profile

This commit is contained in:
Milos Kozak 2017-10-07 18:30:55 +02:00
commit 60086dac8d
6 changed files with 101 additions and 48 deletions

View file

@ -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)

View file

@ -196,6 +196,25 @@
android:layout_height="wrap_content"
android:background="@color/cardColorBackground" />
<TextView
android:id="@+id/configbuilder_treatmentslabel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:background="@color/mdtp_circle_color"
android:paddingLeft="5dp"
android:text="@string/configbuilder_treatments"
android:textAllCaps="true"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@android:color/black"
android:textStyle="bold" />
<ListView
android:id="@+id/configbuilder_treatmentslistview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/cardColorBackground" />
<TextView
android:id="@+id/configbuilder_generallabel"
android:layout_width="match_parent"

View file

@ -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"/>
<CheckBox
android:id="@+id/overview_showprediction"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="-5dp"
android:layout_marginTop="-9dp"
android:layout_marginTop="-5dp"
app:buttonTint="@color/prediction" />
<TextView
@ -261,14 +262,15 @@
android:text="@string/basalshortlabel"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@color/basal"
android:textStyle="bold" />
android:textStyle="bold"
android:paddingTop="4dp"/>
<CheckBox
android:id="@+id/overview_showbasals"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="-5dp"
android:layout_marginTop="-9dp"
android:layout_marginTop="-5dp"
app:buttonTint="@color/basal" />
<TextView
@ -278,14 +280,15 @@
android:text="@string/iob"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@color/iob"
android:textStyle="bold" />
android:textStyle="bold"
android:paddingTop="4dp"/>
<CheckBox
android:id="@+id/overview_showiob"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="-5dp"
android:layout_marginTop="-9dp"
android:layout_marginTop="-5dp"
app:buttonTint="@color/iob" />
<TextView
@ -295,14 +298,15 @@
android:text="@string/cob"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@color/cob"
android:textStyle="bold" />
android:textStyle="bold"
android:paddingTop="4dp"/>
<CheckBox
android:id="@+id/overview_showcob"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="-5dp"
android:layout_marginTop="-9dp"
android:layout_marginTop="-5dp"
app:buttonTint="@color/cob" />
<TextView
@ -312,14 +316,15 @@
android:text="@string/dev"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@color/deviations"
android:textStyle="bold" />
android:textStyle="bold"
android:paddingTop="4dp"/>
<CheckBox
android:id="@+id/overview_showdeviations"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="-5dp"
android:layout_marginTop="-9dp"
android:layout_marginTop="-5dp"
app:buttonTint="@color/deviations" />
<TextView
@ -328,14 +333,15 @@
android:layout_gravity="center_horizontal"
android:text="@string/ratio_short"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textStyle="bold" />
android:textStyle="bold"
android:paddingTop="4dp"/>
<CheckBox
android:id="@+id/overview_showratios"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="-5dp"
android:layout_marginTop="-9dp" />
android:layout_marginTop="-5dp" />
</LinearLayout>

View file

@ -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"/>
<CheckBox
android:id="@+id/overview_showprediction"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="-5dp"
android:layout_marginTop="-9dp"
android:layout_marginTop="-5dp"
app:buttonTint="@color/prediction" />
<TextView
@ -499,14 +500,15 @@
android:text="@string/basalshortlabel"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@color/basal"
android:textStyle="bold" />
android:textStyle="bold"
android:paddingTop="4dp"/>
<CheckBox
android:id="@+id/overview_showbasals"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="-5dp"
android:layout_marginTop="-9dp"
android:layout_marginTop="-5dp"
app:buttonTint="@color/basal" />
<TextView
@ -516,14 +518,15 @@
android:text="@string/iob"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@color/iob"
android:textStyle="bold" />
android:textStyle="bold"
android:paddingTop="4dp"/>
<CheckBox
android:id="@+id/overview_showiob"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="-5dp"
android:layout_marginTop="-9dp"
android:layout_marginTop="-5dp"
app:buttonTint="@color/iob" />
<TextView
@ -533,14 +536,15 @@
android:text="@string/cob"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@color/cob"
android:textStyle="bold" />
android:textStyle="bold"
android:paddingTop="4dp"/>
<CheckBox
android:id="@+id/overview_showcob"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="-5dp"
android:layout_marginTop="-9dp"
android:layout_marginTop="-5dp"
app:buttonTint="@color/cob" />
<TextView
@ -550,14 +554,15 @@
android:text="@string/dev"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@color/deviations"
android:textStyle="bold" />
android:textStyle="bold"
android:paddingTop="4dp"/>
<CheckBox
android:id="@+id/overview_showdeviations"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="-5dp"
android:layout_marginTop="-9dp"
android:layout_marginTop="-5dp"
app:buttonTint="@color/deviations" />
<TextView
@ -566,14 +571,15 @@
android:layout_gravity="center_horizontal"
android:text="@string/ratio_short"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textStyle="bold" />
android:textStyle="bold"
android:paddingTop="4dp"/>
<CheckBox
android:id="@+id/overview_showratios"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="-5dp"
android:layout_marginTop="-9dp" />
android:layout_marginTop="-5dp" />
</LinearLayout>

View file

@ -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"/>
<CheckBox
android:id="@+id/overview_showprediction"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="-5dp"
android:layout_marginTop="-9dp"
android:layout_marginTop="-5dp"
app:buttonTint="@color/prediction" />
<TextView
@ -583,14 +584,15 @@
android:text="@string/basalshortlabel"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@color/basal"
android:textStyle="bold" />
android:textStyle="bold"
android:paddingTop="4dp"/>
<CheckBox
android:id="@+id/overview_showbasals"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="-5dp"
android:layout_marginTop="-9dp"
android:layout_marginTop="-5dp"
app:buttonTint="@color/basal" />
<TextView
@ -600,14 +602,15 @@
android:text="@string/iob"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@color/iob"
android:textStyle="bold" />
android:textStyle="bold"
android:paddingTop="4dp"/>
<CheckBox
android:id="@+id/overview_showiob"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="-5dp"
android:layout_marginTop="-9dp"
android:layout_marginTop="-5dp"
app:buttonTint="@color/iob" />
<TextView
@ -617,14 +620,15 @@
android:text="@string/cob"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@color/cob"
android:textStyle="bold" />
android:textStyle="bold"
android:paddingTop="4dp"/>
<CheckBox
android:id="@+id/overview_showcob"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="-5dp"
android:layout_marginTop="-9dp"
android:layout_marginTop="-5dp"
app:buttonTint="@color/cob" />
<TextView
@ -634,14 +638,15 @@
android:text="@string/dev"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@color/deviations"
android:textStyle="bold" />
android:textStyle="bold"
android:paddingTop="4dp"/>
<CheckBox
android:id="@+id/overview_showdeviations"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="-5dp"
android:layout_marginTop="-9dp"
android:layout_marginTop="-5dp"
app:buttonTint="@color/deviations" />
<TextView
@ -650,14 +655,15 @@
android:layout_gravity="center_horizontal"
android:text="@string/ratio_short"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textStyle="bold" />
android:textStyle="bold"
android:paddingTop="4dp"/>
<CheckBox
android:id="@+id/overview_showratios"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="-5dp"
android:layout_marginTop="-9dp" />
android:layout_marginTop="-5dp" />
</LinearLayout>

View file

@ -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"/>
<CheckBox
android:id="@+id/overview_showprediction"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="-5dp"
android:layout_marginTop="-9dp"
android:layout_marginTop="-5dp"
app:buttonTint="@color/prediction" />
<TextView
@ -256,14 +257,15 @@
android:text="@string/basalshortlabel"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@color/basal"
android:textStyle="bold" />
android:textStyle="bold"
android:paddingTop="4dp"/>
<CheckBox
android:id="@+id/overview_showbasals"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="-5dp"
android:layout_marginTop="-9dp"
android:layout_marginTop="-5dp"
app:buttonTint="@color/basal" />
<TextView
@ -273,14 +275,15 @@
android:text="@string/iob"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@color/iob"
android:textStyle="bold" />
android:textStyle="bold"
android:paddingTop="4dp"/>
<CheckBox
android:id="@+id/overview_showiob"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="-5dp"
android:layout_marginTop="-9dp"
android:layout_marginTop="-5dp"
app:buttonTint="@color/iob" />
<TextView
@ -290,14 +293,15 @@
android:text="@string/cob"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@color/cob"
android:textStyle="bold" />
android:textStyle="bold"
android:paddingTop="4dp"/>
<CheckBox
android:id="@+id/overview_showcob"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="-5dp"
android:layout_marginTop="-9dp"
android:layout_marginTop="-5dp"
app:buttonTint="@color/cob" />
<TextView
@ -307,14 +311,15 @@
android:text="@string/dev"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@color/deviations"
android:textStyle="bold" />
android:textStyle="bold"
android:paddingTop="4dp"/>
<CheckBox
android:id="@+id/overview_showdeviations"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="-5dp"
android:layout_marginTop="-9dp"
android:layout_marginTop="-5dp"
app:buttonTint="@color/deviations" />
<TextView
@ -323,14 +328,15 @@
android:layout_gravity="center_horizontal"
android:text="@string/ratio_short"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textStyle="bold" />
android:textStyle="bold"
android:paddingTop="4dp"/>
<CheckBox
android:id="@+id/overview_showratios"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="-5dp"
android:layout_marginTop="-9dp" />
android:layout_marginTop="-5dp" />
</LinearLayout>