From 3dae8bfd6f65bdbab167ce8ab4deffc7a409ce7f Mon Sep 17 00:00:00 2001 From: Andrei Vereha Date: Thu, 25 Nov 2021 19:26:43 +0100 Subject: [PATCH] hide the 'do not bolus' box --- .../androidaps/dialogs/TreatmentDialog.kt | 2 ++ app/src/main/res/layout/dialog_treatment.xml | 30 +++++++++++-------- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/dialogs/TreatmentDialog.kt b/app/src/main/java/info/nightscout/androidaps/dialogs/TreatmentDialog.kt index 9f185d270b..21130e5816 100644 --- a/app/src/main/java/info/nightscout/androidaps/dialogs/TreatmentDialog.kt +++ b/app/src/main/java/info/nightscout/androidaps/dialogs/TreatmentDialog.kt @@ -1,6 +1,7 @@ package info.nightscout.androidaps.dialogs import android.content.Context +import android.opengl.Visibility import android.os.Bundle import android.text.Editable import android.text.TextWatcher @@ -105,6 +106,7 @@ class TreatmentDialog : DialogFragmentWithDate() { ?: 0.0, 0.0, maxCarbs, 1.0, DecimalFormat("0"), false, binding.okcancel.ok, textWatcher) binding.insulin.setParams(savedInstanceState?.getDouble("insulin") ?: 0.0, 0.0, maxInsulin, pumpDescription.bolusStep, DecimalFormatter.pumpSupportedBolusFormat(activePlugin.activePump), false, binding.okcancel.ok, textWatcher) + binding.recordOnlyLayout.visibility = View.GONE } override fun onDestroyView() { diff --git a/app/src/main/res/layout/dialog_treatment.xml b/app/src/main/res/layout/dialog_treatment.xml index 5098451f1e..2927d9a040 100644 --- a/app/src/main/res/layout/dialog_treatment.xml +++ b/app/src/main/res/layout/dialog_treatment.xml @@ -28,17 +28,6 @@ android:contentDescription="@string/overview_treatment_label" app:srcCompat="@drawable/ic_bolus" /> - - + android:padding="5dp" > + + + + android:orientation="vertical" + tools:visibility="visible">