From 02d2908f9abf1634374efc981d3048bc761596a3 Mon Sep 17 00:00:00 2001 From: Andries Smit Date: Wed, 6 Apr 2022 20:06:59 +0200 Subject: [PATCH] chore: reuse note layout --- .../androidaps/dialogs/WizardDialog.kt | 6 ++-- app/src/main/res/layout/dialog_wizard.xml | 29 ++----------------- 2 files changed, 5 insertions(+), 30 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/dialogs/WizardDialog.kt b/app/src/main/java/info/nightscout/androidaps/dialogs/WizardDialog.kt index e5ff65ffda..13fc6cc0b8 100644 --- a/app/src/main/java/info/nightscout/androidaps/dialogs/WizardDialog.kt +++ b/app/src/main/java/info/nightscout/androidaps/dialogs/WizardDialog.kt @@ -130,7 +130,7 @@ class WizardDialog : DaggerDialogFragment() { val useSuperBolus = sp.getBoolean(R.string.key_usesuperbolus, false) binding.sbCheckbox.visibility = useSuperBolus.toVisibility() binding.superBolusRow.visibility = useSuperBolus.toVisibility() - binding.notesLayout.visibility = sp.getBoolean(R.string.key_show_notes_entry_dialogs, false).toVisibility() + binding.notesLayout.root.visibility = sp.getBoolean(R.string.key_show_notes_entry_dialogs, false).toVisibility() val maxCarbs = constraintChecker.getMaxCarbsAllowed().value() val maxCorrection = constraintChecker.getMaxBolusAllowed().value() @@ -327,7 +327,7 @@ class WizardDialog : DaggerDialogFragment() { binding.carbsInput.value = carbsPassedIntoWizard } if (notesPassedIntoWizard.isNotBlank()) { - binding.notes.setText(notesPassedIntoWizard) + binding.notesLayout.notes.setText(notesPassedIntoWizard) } val profile = profileFunction.getProfile() val profileStore = activePlugin.activeProfileSource.profile @@ -427,7 +427,7 @@ class WizardDialog : DaggerDialogFragment() { binding.ttCheckbox.isChecked, binding.bgTrendCheckbox.isChecked, binding.alarm.isChecked, - binding.notes.text.toString(), + binding.notesLayout.notes.text.toString(), carbTime, usePercentage = usePercentage, totalPercentage = percentageCorrection diff --git a/app/src/main/res/layout/dialog_wizard.xml b/app/src/main/res/layout/dialog_wizard.xml index 91b2bd2a4d..69f9ae3459 100644 --- a/app/src/main/res/layout/dialog_wizard.xml +++ b/app/src/main/res/layout/dialog_wizard.xml @@ -211,34 +211,9 @@ - - - - - - - + layout="@layout/notes" />