diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/Overview/Dialogs/WizardDialog.java b/app/src/main/java/info/nightscout/androidaps/plugins/Overview/Dialogs/WizardDialog.java index 20c9c0a0db..4885ced028 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/Overview/Dialogs/WizardDialog.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/Overview/Dialogs/WizardDialog.java @@ -69,6 +69,7 @@ import info.nightscout.utils.BolusWizard; import info.nightscout.utils.DateUtil; import info.nightscout.utils.DecimalFormatter; import info.nightscout.utils.PlusMinusEditText; +import info.nightscout.utils.SP; import info.nightscout.utils.SafeParse; import info.nightscout.utils.ToastUtils; @@ -246,6 +247,8 @@ public class WizardDialog extends DialogFragment { carbsInput.addTextChangedListener(textWatcher); bgInput.addTextChangedListener(textWatcher); + superbolusCheckbox.setVisibility(SP.getBoolean(R.string.key_usesuperbolus, false) ? View.VISIBLE : View.GONE); + Integer maxCarbs = MainApp.getConfigBuilder().applyCarbsConstraints(Constants.carbsOnlyForCheckLimit); Double maxCorrection = MainApp.getConfigBuilder().applyBolusConstraints(Constants.bolusOnlyForCheckLimit); @@ -368,8 +371,8 @@ public class WizardDialog extends DialogFragment { ArrayList profileList; profileList = profile.getProfileList(); ArrayAdapter adapter = new ArrayAdapter(getContext(), - android.R.layout.simple_spinner_item, profileList); - adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); + R.layout.spinner_centered, profileList); + profileSpinner.setAdapter(adapter); // set selected to actual profile for (int p = 0; p < profileList.size(); p++) { diff --git a/app/src/main/res/layout/overview_wizard_dialog.xml b/app/src/main/res/layout/overview_wizard_dialog.xml index caeee2b270..3e19051842 100644 --- a/app/src/main/res/layout/overview_wizard_dialog.xml +++ b/app/src/main/res/layout/overview_wizard_dialog.xml @@ -261,7 +261,6 @@ @@ -270,7 +269,7 @@ android:id="@+id/treatments_wizard_profile" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_gravity="center_vertical" + android:layout_gravity="center_vertical|center_horizontal" android:layout_weight="0.5" /> @@ -537,7 +536,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:width="80dp" - android:text="@string/treatments_wizard_sb_label" + android:text="@string/superbolus" android:textAppearance="?android:attr/textAppearanceSmall" /> + \ No newline at end of file diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml index ded267e354..261e19bcab 100644 --- a/app/src/main/res/values-cs/strings.xml +++ b/app/src/main/res/values-cs/strings.xml @@ -540,5 +540,7 @@ Superbolus (%d m) 15min trend COB - Superbolus + Superbolus + Povolit superbolus + Povolení superbolusu v kalkulátoru. Nepovolujte, dokud se nenaučíte, co to opravdu dělá. MŮŽE ZPŮSOBIT PŘEDÁVKOVÁNÍ INZULÍNEM PŘI NESPRÁVNÉM POUŽITÍ! diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index cee9303d4d..84daf96e5c 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -580,7 +580,7 @@ Loop resumed 15min trend COB - Superbolus + Superbolus Log app start to NS ns_logappstartedevent Exiting application to apply settings. @@ -589,4 +589,7 @@ Novorapid, Novolog, Humalog INS Fast Acting Insuin Prolonged + key_usersuperbolus + Enable superbolus in wizard + Enable superbolus functionality in wizard. Do not enable until you learn what it really does. IT MAY CAUSE INSULIN OVERDOSE IF USED BLINDLY! diff --git a/app/src/main/res/xml/pref_advanced.xml b/app/src/main/res/xml/pref_advanced.xml index 0ebe02c9d1..b385206d10 100644 --- a/app/src/main/res/xml/pref_advanced.xml +++ b/app/src/main/res/xml/pref_advanced.xml @@ -18,6 +18,14 @@ android:key="ns_sync_use_absolute" android:title="@string/ns_sync_use_absolute_title" /> + + +