cleanup, dark dialog title

This commit is contained in:
Milos Kozak 2019-12-20 18:55:54 +01:00
parent 226990b16f
commit 44564b91df
29 changed files with 294 additions and 229 deletions

View file

@ -1,4 +1,4 @@
package info.nightscout.androidaps.plugins.general.overview.dialogs package info.nightscout.androidaps.dialogs
import android.os.Bundle import android.os.Bundle
import android.view.LayoutInflater import android.view.LayoutInflater
@ -15,7 +15,7 @@ import info.nightscout.androidaps.utils.HtmlHelper
import info.nightscout.androidaps.utils.OKDialog import info.nightscout.androidaps.utils.OKDialog
import info.nightscout.androidaps.utils.XdripCalibrations import info.nightscout.androidaps.utils.XdripCalibrations
import kotlinx.android.synthetic.main.okcancel.* import kotlinx.android.synthetic.main.okcancel.*
import kotlinx.android.synthetic.main.overview_calibration_dialog.* import kotlinx.android.synthetic.main.dialog_calibration.*
import java.text.DecimalFormat import java.text.DecimalFormat
import java.util.* import java.util.*
@ -29,7 +29,7 @@ class CalibrationDialog : DialogFragmentWithDate() {
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?,
savedInstanceState: Bundle?): View? { savedInstanceState: Bundle?): View? {
onCreateView() onCreateView()
return inflater.inflate(R.layout.overview_calibration_dialog, container, false) return inflater.inflate(R.layout.dialog_calibration, container, false)
} }
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { override fun onViewCreated(view: View, savedInstanceState: Bundle?) {

View file

@ -1,4 +1,4 @@
package info.nightscout.androidaps.plugins.general.overview.dialogs package info.nightscout.androidaps.dialogs
import android.os.Bundle import android.os.Bundle
import android.text.Editable import android.text.Editable
@ -23,8 +23,7 @@ import info.nightscout.androidaps.plugins.treatments.TreatmentsPlugin
import info.nightscout.androidaps.utils.* import info.nightscout.androidaps.utils.*
import kotlinx.android.synthetic.main.notes.* import kotlinx.android.synthetic.main.notes.*
import kotlinx.android.synthetic.main.okcancel.* import kotlinx.android.synthetic.main.okcancel.*
import kotlinx.android.synthetic.main.overview_carbs_dialog.* import kotlinx.android.synthetic.main.dialog_carbs.*
import org.slf4j.LoggerFactory
import java.text.DecimalFormat import java.text.DecimalFormat
import java.util.* import java.util.*
import kotlin.math.max import kotlin.math.max
@ -74,7 +73,7 @@ class CarbsDialog : DialogFragmentWithDate() {
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?,
savedInstanceState: Bundle?): View? { savedInstanceState: Bundle?): View? {
onCreateView() onCreateView()
return inflater.inflate(R.layout.overview_carbs_dialog, container, false) return inflater.inflate(R.layout.dialog_carbs, container, false)
} }
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { override fun onViewCreated(view: View, savedInstanceState: Bundle?) {

View file

@ -1,4 +1,4 @@
package info.nightscout.androidaps.plugins.general.actions.dialogs package info.nightscout.androidaps.dialogs
import android.os.Bundle import android.os.Bundle
import android.text.Editable import android.text.Editable
@ -15,10 +15,9 @@ import info.nightscout.androidaps.data.Profile
import info.nightscout.androidaps.db.CareportalEvent import info.nightscout.androidaps.db.CareportalEvent
import info.nightscout.androidaps.plugins.configBuilder.ProfileFunctions import info.nightscout.androidaps.plugins.configBuilder.ProfileFunctions
import info.nightscout.androidaps.plugins.general.nsclient.NSUpload import info.nightscout.androidaps.plugins.general.nsclient.NSUpload
import info.nightscout.androidaps.plugins.general.overview.dialogs.DialogFragmentWithDate
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.GlucoseStatus import info.nightscout.androidaps.plugins.iob.iobCobCalculator.GlucoseStatus
import info.nightscout.androidaps.utils.* import info.nightscout.androidaps.utils.*
import kotlinx.android.synthetic.main.actions_care_dialog.* import kotlinx.android.synthetic.main.dialog_care.*
import kotlinx.android.synthetic.main.okcancel.* import kotlinx.android.synthetic.main.okcancel.*
import kotlinx.android.synthetic.main.notes.* import kotlinx.android.synthetic.main.notes.*
import org.json.JSONObject import org.json.JSONObject
@ -51,7 +50,7 @@ class CareDialog : DialogFragmentWithDate() {
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?,
savedInstanceState: Bundle?): View? { savedInstanceState: Bundle?): View? {
onCreateView() onCreateView()
return inflater.inflate(R.layout.actions_care_dialog, container, false) return inflater.inflate(R.layout.dialog_care, container, false)
} }
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { override fun onViewCreated(view: View, savedInstanceState: Bundle?) {

View file

@ -1,4 +1,4 @@
package info.nightscout.androidaps.plugins.general.overview.dialogs package info.nightscout.androidaps.dialogs
import android.app.DatePickerDialog import android.app.DatePickerDialog
import android.app.TimePickerDialog import android.app.TimePickerDialog

View file

@ -1,4 +1,4 @@
package info.nightscout.androidaps.plugins.general.actions.dialogs package info.nightscout.androidaps.dialogs
import android.content.Intent import android.content.Intent
import android.os.Bundle import android.os.Bundle
@ -10,13 +10,12 @@ import info.nightscout.androidaps.MainApp
import info.nightscout.androidaps.R import info.nightscout.androidaps.R
import info.nightscout.androidaps.interfaces.Constraint import info.nightscout.androidaps.interfaces.Constraint
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin
import info.nightscout.androidaps.plugins.general.overview.dialogs.DialogFragmentWithDate
import info.nightscout.androidaps.plugins.general.overview.dialogs.ErrorHelperActivity import info.nightscout.androidaps.plugins.general.overview.dialogs.ErrorHelperActivity
import info.nightscout.androidaps.queue.Callback import info.nightscout.androidaps.queue.Callback
import info.nightscout.androidaps.utils.HtmlHelper import info.nightscout.androidaps.utils.HtmlHelper
import info.nightscout.androidaps.utils.OKDialog import info.nightscout.androidaps.utils.OKDialog
import info.nightscout.androidaps.utils.SafeParse import info.nightscout.androidaps.utils.SafeParse
import kotlinx.android.synthetic.main.actions_extendedbolus_dialog.* import kotlinx.android.synthetic.main.dialog_extendedbolus.*
import kotlinx.android.synthetic.main.okcancel.* import kotlinx.android.synthetic.main.okcancel.*
import java.text.DecimalFormat import java.text.DecimalFormat
import java.util.* import java.util.*
@ -33,7 +32,7 @@ class ExtendedBolusDialog : DialogFragmentWithDate() {
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?,
savedInstanceState: Bundle?): View? { savedInstanceState: Bundle?): View? {
onCreateView() onCreateView()
return inflater.inflate(R.layout.actions_extendedbolus_dialog, container, false) return inflater.inflate(R.layout.dialog_extendedbolus, container, false)
} }
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { override fun onViewCreated(view: View, savedInstanceState: Bundle?) {

View file

@ -1,4 +1,4 @@
package info.nightscout.androidaps.plugins.general.actions.dialogs package info.nightscout.androidaps.dialogs
import android.content.Intent import android.content.Intent
import android.os.Bundle import android.os.Bundle
@ -14,11 +14,10 @@ import info.nightscout.androidaps.db.Source
import info.nightscout.androidaps.interfaces.Constraint import info.nightscout.androidaps.interfaces.Constraint
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin
import info.nightscout.androidaps.plugins.general.nsclient.NSUpload import info.nightscout.androidaps.plugins.general.nsclient.NSUpload
import info.nightscout.androidaps.plugins.general.overview.dialogs.DialogFragmentWithDate
import info.nightscout.androidaps.plugins.general.overview.dialogs.ErrorHelperActivity import info.nightscout.androidaps.plugins.general.overview.dialogs.ErrorHelperActivity
import info.nightscout.androidaps.queue.Callback import info.nightscout.androidaps.queue.Callback
import info.nightscout.androidaps.utils.* import info.nightscout.androidaps.utils.*
import kotlinx.android.synthetic.main.actions_fill_dialog.* import kotlinx.android.synthetic.main.dialog_fill.*
import kotlinx.android.synthetic.main.notes.* import kotlinx.android.synthetic.main.notes.*
import kotlinx.android.synthetic.main.okcancel.* import kotlinx.android.synthetic.main.okcancel.*
import java.util.* import java.util.*
@ -34,7 +33,7 @@ class FillDialog : DialogFragmentWithDate() {
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?,
savedInstanceState: Bundle?): View? { savedInstanceState: Bundle?): View? {
onCreateView() onCreateView()
return inflater.inflate(R.layout.actions_fill_dialog, container, false) return inflater.inflate(R.layout.dialog_fill, container, false)
} }
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { override fun onViewCreated(view: View, savedInstanceState: Bundle?) {

View file

@ -1,4 +1,4 @@
package info.nightscout.androidaps.plugins.general.overview.dialogs package info.nightscout.androidaps.dialogs
import android.content.Intent import android.content.Intent
import android.os.Bundle import android.os.Bundle
@ -19,13 +19,13 @@ import info.nightscout.androidaps.db.TempTarget
import info.nightscout.androidaps.interfaces.Constraint import info.nightscout.androidaps.interfaces.Constraint
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin
import info.nightscout.androidaps.plugins.configBuilder.ProfileFunctions import info.nightscout.androidaps.plugins.configBuilder.ProfileFunctions
import info.nightscout.androidaps.plugins.general.overview.dialogs.ErrorHelperActivity
import info.nightscout.androidaps.plugins.treatments.TreatmentsPlugin import info.nightscout.androidaps.plugins.treatments.TreatmentsPlugin
import info.nightscout.androidaps.queue.Callback import info.nightscout.androidaps.queue.Callback
import info.nightscout.androidaps.utils.* import info.nightscout.androidaps.utils.*
import kotlinx.android.synthetic.main.notes.* import kotlinx.android.synthetic.main.notes.*
import kotlinx.android.synthetic.main.okcancel.* import kotlinx.android.synthetic.main.okcancel.*
import kotlinx.android.synthetic.main.overview_insulin_dialog.* import kotlinx.android.synthetic.main.dialog_insulin.*
import org.slf4j.LoggerFactory
import java.text.DecimalFormat import java.text.DecimalFormat
import java.util.* import java.util.*
import kotlin.math.abs import kotlin.math.abs
@ -70,7 +70,7 @@ class InsulinDialog : DialogFragmentWithDate() {
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?,
savedInstanceState: Bundle?): View? { savedInstanceState: Bundle?): View? {
onCreateView() onCreateView()
return inflater.inflate(R.layout.overview_insulin_dialog, container, false) return inflater.inflate(R.layout.dialog_insulin, container, false)
} }
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { override fun onViewCreated(view: View, savedInstanceState: Bundle?) {

View file

@ -1,4 +1,4 @@
package info.nightscout.androidaps.plugins.general.overview.dialogs package info.nightscout.androidaps.dialogs
import android.os.Bundle import android.os.Bundle
import android.view.LayoutInflater import android.view.LayoutInflater
@ -17,7 +17,7 @@ import info.nightscout.androidaps.utils.HtmlHelper
import info.nightscout.androidaps.utils.OKDialog import info.nightscout.androidaps.utils.OKDialog
import kotlinx.android.synthetic.main.notes.* import kotlinx.android.synthetic.main.notes.*
import kotlinx.android.synthetic.main.okcancel.* import kotlinx.android.synthetic.main.okcancel.*
import kotlinx.android.synthetic.main.overview_profileswitch_dialog.* import kotlinx.android.synthetic.main.dialog_profileswitch.*
import java.text.DecimalFormat import java.text.DecimalFormat
import java.util.* import java.util.*
@ -33,7 +33,7 @@ class ProfileSwitchDialog : DialogFragmentWithDate() {
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?,
savedInstanceState: Bundle?): View? { savedInstanceState: Bundle?): View? {
onCreateView() onCreateView()
return inflater.inflate(R.layout.overview_profileswitch_dialog, container, false) return inflater.inflate(R.layout.dialog_profileswitch, container, false)
} }
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { override fun onViewCreated(view: View, savedInstanceState: Bundle?) {

View file

@ -1,4 +1,4 @@
package info.nightscout.androidaps.plugins.general.actions.dialogs package info.nightscout.androidaps.dialogs
import android.content.Intent import android.content.Intent
import android.os.Bundle import android.os.Bundle
@ -12,13 +12,12 @@ import info.nightscout.androidaps.interfaces.Constraint
import info.nightscout.androidaps.interfaces.PumpDescription import info.nightscout.androidaps.interfaces.PumpDescription
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin
import info.nightscout.androidaps.plugins.configBuilder.ProfileFunctions import info.nightscout.androidaps.plugins.configBuilder.ProfileFunctions
import info.nightscout.androidaps.plugins.general.overview.dialogs.DialogFragmentWithDate
import info.nightscout.androidaps.plugins.general.overview.dialogs.ErrorHelperActivity import info.nightscout.androidaps.plugins.general.overview.dialogs.ErrorHelperActivity
import info.nightscout.androidaps.queue.Callback import info.nightscout.androidaps.queue.Callback
import info.nightscout.androidaps.utils.HtmlHelper import info.nightscout.androidaps.utils.HtmlHelper
import info.nightscout.androidaps.utils.OKDialog import info.nightscout.androidaps.utils.OKDialog
import info.nightscout.androidaps.utils.SafeParse import info.nightscout.androidaps.utils.SafeParse
import kotlinx.android.synthetic.main.actions_tempbasal_dialog.* import kotlinx.android.synthetic.main.dialog_tempbasal.*
import kotlinx.android.synthetic.main.okcancel.* import kotlinx.android.synthetic.main.okcancel.*
import java.text.DecimalFormat import java.text.DecimalFormat
import java.util.* import java.util.*
@ -37,7 +36,7 @@ class TempBasalDialog : DialogFragmentWithDate() {
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?,
savedInstanceState: Bundle?): View? { savedInstanceState: Bundle?): View? {
onCreateView() onCreateView()
return inflater.inflate(R.layout.actions_tempbasal_dialog, container, false) return inflater.inflate(R.layout.dialog_tempbasal, container, false)
} }
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { override fun onViewCreated(view: View, savedInstanceState: Bundle?) {

View file

@ -1,4 +1,4 @@
package info.nightscout.androidaps.plugins.general.overview.dialogs package info.nightscout.androidaps.dialogs
import android.os.Bundle import android.os.Bundle
import android.view.LayoutInflater import android.view.LayoutInflater
@ -18,7 +18,7 @@ import info.nightscout.androidaps.plugins.configBuilder.ProfileFunctions
import info.nightscout.androidaps.plugins.treatments.TreatmentsPlugin import info.nightscout.androidaps.plugins.treatments.TreatmentsPlugin
import info.nightscout.androidaps.utils.* import info.nightscout.androidaps.utils.*
import kotlinx.android.synthetic.main.okcancel.* import kotlinx.android.synthetic.main.okcancel.*
import kotlinx.android.synthetic.main.overview_temptarget_dialog.* import kotlinx.android.synthetic.main.dialog_temptarget.*
import java.text.DecimalFormat import java.text.DecimalFormat
import java.util.* import java.util.*
@ -33,7 +33,7 @@ class TempTargetDialog : DialogFragmentWithDate() {
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?,
savedInstanceState: Bundle?): View? { savedInstanceState: Bundle?): View? {
onCreateView() onCreateView()
return inflater.inflate(R.layout.overview_temptarget_dialog, container, false) return inflater.inflate(R.layout.dialog_temptarget, container, false)
} }
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
@ -53,6 +53,8 @@ class TempTargetDialog : DialogFragmentWithDate() {
?: Constants.MIN_TT_MGDL, ?: Constants.MIN_TT_MGDL,
Constants.MIN_TT_MGDL, Constants.MAX_TT_MGDL, 1.0, DecimalFormat("0"), false, ok) Constants.MIN_TT_MGDL, Constants.MAX_TT_MGDL, 1.0, DecimalFormat("0"), false, ok)
val units = ProfileFunctions.getSystemUnits()
overview_temptarget_units.text = if (units == Constants.MMOL) MainApp.gs(R.string.mmol) else MainApp.gs(R.string.mgdl)
// temp target // temp target
context?.let { context -> context?.let { context ->
val reasonList: List<String> = Lists.newArrayList( val reasonList: List<String> = Lists.newArrayList(

View file

@ -1,4 +1,4 @@
package info.nightscout.androidaps.plugins.general.overview.dialogs package info.nightscout.androidaps.dialogs
import android.content.Intent import android.content.Intent
import android.os.Bundle import android.os.Bundle
@ -15,11 +15,12 @@ import info.nightscout.androidaps.db.CareportalEvent
import info.nightscout.androidaps.db.Source import info.nightscout.androidaps.db.Source
import info.nightscout.androidaps.interfaces.Constraint import info.nightscout.androidaps.interfaces.Constraint
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin
import info.nightscout.androidaps.plugins.general.overview.dialogs.ErrorHelperActivity
import info.nightscout.androidaps.plugins.treatments.TreatmentsPlugin import info.nightscout.androidaps.plugins.treatments.TreatmentsPlugin
import info.nightscout.androidaps.queue.Callback import info.nightscout.androidaps.queue.Callback
import info.nightscout.androidaps.utils.* import info.nightscout.androidaps.utils.*
import kotlinx.android.synthetic.main.okcancel.* import kotlinx.android.synthetic.main.okcancel.*
import kotlinx.android.synthetic.main.overview_treatment_dialog.* import kotlinx.android.synthetic.main.dialog_treatment.*
import java.text.DecimalFormat import java.text.DecimalFormat
import java.util.* import java.util.*
import kotlin.math.abs import kotlin.math.abs
@ -56,7 +57,7 @@ class TreatmentDialog : DialogFragmentWithDate() {
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?,
savedInstanceState: Bundle?): View? { savedInstanceState: Bundle?): View? {
onCreateView() onCreateView()
return inflater.inflate(R.layout.overview_treatment_dialog, container, false) return inflater.inflate(R.layout.dialog_treatment, container, false)
} }
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { override fun onViewCreated(view: View, savedInstanceState: Bundle?) {

View file

@ -1,6 +1,5 @@
package info.nightscout.androidaps.plugins.general.overview.dialogs package info.nightscout.androidaps.dialogs
import android.content.Context
import android.os.Bundle import android.os.Bundle
import android.text.Editable import android.text.Editable
import android.text.TextWatcher import android.text.TextWatcher
@ -26,7 +25,7 @@ import info.nightscout.androidaps.plugins.treatments.TreatmentsPlugin
import info.nightscout.androidaps.utils.* import info.nightscout.androidaps.utils.*
import io.reactivex.android.schedulers.AndroidSchedulers import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.disposables.CompositeDisposable import io.reactivex.disposables.CompositeDisposable
import kotlinx.android.synthetic.main.overview_wizard_dialog.* import kotlinx.android.synthetic.main.dialog_wizard.*
import org.slf4j.LoggerFactory import org.slf4j.LoggerFactory
import java.text.DecimalFormat import java.text.DecimalFormat
import java.util.* import java.util.*
@ -36,16 +35,13 @@ class WizardDialog : DialogFragment() {
private val log = LoggerFactory.getLogger(WizardDialog::class.java) private val log = LoggerFactory.getLogger(WizardDialog::class.java)
private var wizard: BolusWizard? = null private var wizard: BolusWizard? = null
private var parentContext: Context? = null
//one shot guards //one shot guards
private var okClicked: Boolean = false private var okClicked: Boolean = false
private val textWatcher = object : TextWatcher { private val textWatcher = object : TextWatcher {
override fun afterTextChanged(s: Editable) {} override fun afterTextChanged(s: Editable) {}
override fun beforeTextChanged(s: CharSequence, start: Int, count: Int, after: Int) {} override fun beforeTextChanged(s: CharSequence, start: Int, count: Int, after: Int) {}
override fun onTextChanged(s: CharSequence, start: Int, before: Int, count: Int) { override fun onTextChanged(s: CharSequence, start: Int, before: Int, count: Int) {
calculateInsulin() calculateInsulin()
} }
@ -53,21 +49,11 @@ class WizardDialog : DialogFragment() {
private var disposable: CompositeDisposable = CompositeDisposable() private var disposable: CompositeDisposable = CompositeDisposable()
override fun onAttach(context: Context) {
super.onAttach(context)
this.parentContext = context
}
override fun onStart() { override fun onStart() {
super.onStart() super.onStart()
dialog?.window?.setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT) dialog?.window?.setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT)
} }
override fun onDetach() {
super.onDetach()
this.parentContext = null
}
override fun onSaveInstanceState(savedInstanceState: Bundle) { override fun onSaveInstanceState(savedInstanceState: Bundle) {
super.onSaveInstanceState(savedInstanceState) super.onSaveInstanceState(savedInstanceState)
savedInstanceState.putDouble("treatments_wizard_bg_input", treatments_wizard_bg_input.value) savedInstanceState.putDouble("treatments_wizard_bg_input", treatments_wizard_bg_input.value)
@ -83,7 +69,7 @@ class WizardDialog : DialogFragment() {
isCancelable = true isCancelable = true
dialog?.setCanceledOnTouchOutside(false) dialog?.setCanceledOnTouchOutside(false)
return inflater.inflate(R.layout.overview_wizard_dialog, container, false) return inflater.inflate(R.layout.dialog_wizard, container, false)
} }
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
@ -115,7 +101,7 @@ class WizardDialog : DialogFragment() {
} else { } else {
okClicked = true okClicked = true
calculateInsulin() calculateInsulin()
parentContext?.let { context -> context?.let { context ->
wizard?.confirmAndExecute(context) wizard?.confirmAndExecute(context)
} }
} }

View file

@ -19,14 +19,14 @@ import info.nightscout.androidaps.plugins.bus.RxBus
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin
import info.nightscout.androidaps.plugins.configBuilder.ProfileFunctions import info.nightscout.androidaps.plugins.configBuilder.ProfileFunctions
import info.nightscout.androidaps.plugins.general.actions.defs.CustomAction import info.nightscout.androidaps.plugins.general.actions.defs.CustomAction
import info.nightscout.androidaps.plugins.general.actions.dialogs.CareDialog import info.nightscout.androidaps.dialogs.CareDialog
import info.nightscout.androidaps.plugins.general.actions.dialogs.ExtendedBolusDialog import info.nightscout.androidaps.dialogs.ExtendedBolusDialog
import info.nightscout.androidaps.plugins.general.actions.dialogs.FillDialog import info.nightscout.androidaps.dialogs.FillDialog
import info.nightscout.androidaps.plugins.general.actions.dialogs.TempBasalDialog import info.nightscout.androidaps.dialogs.TempBasalDialog
import info.nightscout.androidaps.plugins.general.careportal.CareportalFragment import info.nightscout.androidaps.plugins.general.careportal.CareportalFragment
import info.nightscout.androidaps.plugins.general.overview.dialogs.ErrorHelperActivity import info.nightscout.androidaps.plugins.general.overview.dialogs.ErrorHelperActivity
import info.nightscout.androidaps.plugins.general.overview.dialogs.ProfileSwitchDialog import info.nightscout.androidaps.dialogs.ProfileSwitchDialog
import info.nightscout.androidaps.plugins.general.overview.dialogs.TempTargetDialog import info.nightscout.androidaps.dialogs.TempTargetDialog
import info.nightscout.androidaps.plugins.treatments.TreatmentsPlugin import info.nightscout.androidaps.plugins.treatments.TreatmentsPlugin
import info.nightscout.androidaps.queue.Callback import info.nightscout.androidaps.queue.Callback
import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.FabricPrivacy

View file

@ -87,13 +87,13 @@ import info.nightscout.androidaps.plugins.general.careportal.CareportalFragment;
import info.nightscout.androidaps.plugins.general.nsclient.NSUpload; import info.nightscout.androidaps.plugins.general.nsclient.NSUpload;
import info.nightscout.androidaps.plugins.general.nsclient.data.NSDeviceStatus; import info.nightscout.androidaps.plugins.general.nsclient.data.NSDeviceStatus;
import info.nightscout.androidaps.plugins.general.overview.activities.QuickWizardListActivity; import info.nightscout.androidaps.plugins.general.overview.activities.QuickWizardListActivity;
import info.nightscout.androidaps.plugins.general.overview.dialogs.CalibrationDialog; import info.nightscout.androidaps.dialogs.CalibrationDialog;
import info.nightscout.androidaps.plugins.general.overview.dialogs.CarbsDialog; import info.nightscout.androidaps.dialogs.CarbsDialog;
import info.nightscout.androidaps.plugins.general.overview.dialogs.InsulinDialog; import info.nightscout.androidaps.dialogs.InsulinDialog;
import info.nightscout.androidaps.plugins.general.overview.dialogs.TreatmentDialog; import info.nightscout.androidaps.dialogs.TreatmentDialog;
import info.nightscout.androidaps.plugins.general.overview.dialogs.ProfileSwitchDialog; import info.nightscout.androidaps.dialogs.ProfileSwitchDialog;
import info.nightscout.androidaps.plugins.general.overview.dialogs.TempTargetDialog; import info.nightscout.androidaps.dialogs.TempTargetDialog;
import info.nightscout.androidaps.plugins.general.overview.dialogs.WizardDialog; import info.nightscout.androidaps.dialogs.WizardDialog;
import info.nightscout.androidaps.plugins.general.overview.graphData.GraphData; import info.nightscout.androidaps.plugins.general.overview.graphData.GraphData;
import info.nightscout.androidaps.plugins.general.wear.ActionStringHandler; import info.nightscout.androidaps.plugins.general.wear.ActionStringHandler;
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.AutosensData; import info.nightscout.androidaps.plugins.iob.iobCobCalculator.AutosensData;

View file

@ -16,7 +16,7 @@ import info.nightscout.androidaps.R
import info.nightscout.androidaps.data.Profile import info.nightscout.androidaps.data.Profile
import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.bus.RxBus
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin
import info.nightscout.androidaps.plugins.general.overview.dialogs.ProfileSwitchDialog import info.nightscout.androidaps.dialogs.ProfileSwitchDialog
import info.nightscout.androidaps.plugins.insulin.InsulinOrefBasePlugin.MIN_DIA import info.nightscout.androidaps.plugins.insulin.InsulinOrefBasePlugin.MIN_DIA
import info.nightscout.androidaps.plugins.profile.local.events.EventLocalProfileChanged import info.nightscout.androidaps.plugins.profile.local.events.EventLocalProfileChanged
import info.nightscout.androidaps.utils.* import info.nightscout.androidaps.utils.*

View file

@ -23,14 +23,11 @@ import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
import info.nightscout.androidaps.plugins.configBuilder.ProfileFunctions; import info.nightscout.androidaps.plugins.configBuilder.ProfileFunctions;
import info.nightscout.androidaps.plugins.constraints.objectives.ObjectivesFragment; import info.nightscout.androidaps.plugins.constraints.objectives.ObjectivesFragment;
import info.nightscout.androidaps.plugins.constraints.objectives.ObjectivesPlugin; import info.nightscout.androidaps.plugins.constraints.objectives.ObjectivesPlugin;
import info.nightscout.androidaps.plugins.general.careportal.CareportalFragment;
import info.nightscout.androidaps.plugins.general.careportal.Dialogs.NewNSTreatmentDialog;
import info.nightscout.androidaps.plugins.general.careportal.OptionsToShow;
import info.nightscout.androidaps.plugins.general.maintenance.ImportExportPrefs; import info.nightscout.androidaps.plugins.general.maintenance.ImportExportPrefs;
import info.nightscout.androidaps.plugins.general.nsclient.NSClientPlugin; import info.nightscout.androidaps.plugins.general.nsclient.NSClientPlugin;
import info.nightscout.androidaps.plugins.general.nsclient.events.EventNSClientStatus; import info.nightscout.androidaps.plugins.general.nsclient.events.EventNSClientStatus;
import info.nightscout.androidaps.plugins.general.nsclient.services.NSClientService; import info.nightscout.androidaps.plugins.general.nsclient.services.NSClientService;
import info.nightscout.androidaps.plugins.general.overview.dialogs.ProfileSwitchDialog; import info.nightscout.androidaps.dialogs.ProfileSwitchDialog;
import info.nightscout.androidaps.plugins.profile.local.LocalProfileFragment; import info.nightscout.androidaps.plugins.profile.local.LocalProfileFragment;
import info.nightscout.androidaps.plugins.profile.local.LocalProfilePlugin; import info.nightscout.androidaps.plugins.profile.local.LocalProfilePlugin;
import info.nightscout.androidaps.plugins.profile.ns.NSProfileFragment; import info.nightscout.androidaps.plugins.profile.ns.NSProfileFragment;

View file

@ -3,7 +3,10 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
tools:context=".plugins.general.overview.dialogs.CalibrationDialog"> android:focusableInTouchMode="true"
android:minWidth="300dp"
android:orientation="vertical"
tools:context=".dialogs.CalibrationDialog">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -11,11 +14,11 @@
android:orientation="vertical"> android:orientation="vertical">
<LinearLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
android:background="@color/dialogtitle" android:background="@color/dialog_title_backround"
android:orientation="horizontal" android:orientation="horizontal"
android:padding="5dp"> android:padding="5dp">
@ -30,19 +33,21 @@
android:id="@+id/actions_care_title" android:id="@+id/actions_care_title"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_gravity="center" android:layout_gravity="center"
android:layout_marginLeft="10dp" android:layout_marginLeft="10dp"
android:layout_marginRight="10dp" android:layout_marginRight="10dp"
android:text="@string/overview_calibration" android:text="@string/overview_calibration"
android:textAlignment="center" android:textAlignment="center"
android:textAppearance="?android:attr/textAppearanceLarge" /> android:textAppearance="?android:attr/textAppearanceLarge" />
</LinearLayout> </RelativeLayout>
<LinearLayout <LinearLayout
android:id="@+id/spacer"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal" android:orientation="horizontal"
android:padding="5dp"/> android:padding="5dp" />
<LinearLayout <LinearLayout
android:id="@+id/action_care_bg_layout" android:id="@+id/action_care_bg_layout"

View file

@ -6,20 +6,20 @@
android:focusableInTouchMode="true" android:focusableInTouchMode="true"
android:minWidth="300dp" android:minWidth="300dp"
android:orientation="vertical" android:orientation="vertical"
android:padding="10dp" tools:context=".dialogs.CarbsDialog">
tools:context=".plugins.general.overview.dialogs.CarbsDialog">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"> android:orientation="vertical">
<LinearLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
android:background="@color/dialog_title_backround"
android:orientation="horizontal" android:orientation="horizontal"
android:padding="10dp"> android:padding="5dp">
<ImageView <ImageView
android:layout_width="wrap_content" android:layout_width="wrap_content"
@ -30,19 +30,28 @@
<TextView <TextView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_gravity="center" android:layout_gravity="center"
android:layout_marginLeft="10dp" android:layout_marginLeft="10dp"
android:layout_marginRight="10dp" android:layout_marginRight="10dp"
android:text="@string/carbs" android:text="@string/carbs"
android:textAlignment="center" android:textAlignment="center"
android:textAppearance="?android:attr/textAppearanceLarge" /> android:textAppearance="?android:attr/textAppearanceLarge" />
</LinearLayout>
</RelativeLayout>
<LinearLayout
android:id="@+id/spacer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="5dp" />
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:orientation="vertical"
android:orientation="vertical"> android:padding="5dp">
<CheckBox <CheckBox
android:id="@+id/overview_carbs_activity_tt" android:id="@+id/overview_carbs_activity_tt"
@ -65,13 +74,6 @@
</LinearLayout> </LinearLayout>
<View
android:layout_width="fill_parent"
android:layout_height="2dip"
android:layout_marginTop="5dp"
android:layout_marginBottom="5dp"
android:background="@color/listdelimiter" />
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -174,8 +176,8 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_marginBottom="5dp" android:orientation="horizontal"
android:orientation="horizontal"> android:padding="5dp">
<Button <Button
android:id="@+id/overview_carbs_plus1" android:id="@+id/overview_carbs_plus1"

View file

@ -6,39 +6,77 @@
android:focusableInTouchMode="true" android:focusableInTouchMode="true"
android:minWidth="300dp" android:minWidth="300dp"
android:orientation="vertical" android:orientation="vertical"
android:padding="10dp" tools:context=".dialogs.CareDialog">
tools:context=".plugins.general.actions.dialogs.CareDialog">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"> android:orientation="vertical">
<LinearLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
android:background="@color/dialog_title_backround"
android:orientation="horizontal" android:orientation="horizontal"
android:padding="10dp"> android:padding="5dp">
<ImageView <ImageView
android:id="@+id/actions_care_icon" android:id="@+id/actions_care_icon"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:src="@drawable/icon_actions_profileswitch" android:contentDescription="@string/careportal_profileswitch"
android:contentDescription="@string/careportal_profileswitch" /> android:src="@drawable/icon_actions_profileswitch" />
<TextView <TextView
android:id="@+id/actions_care_title" android:id="@+id/actions_care_title"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_gravity="center" android:layout_gravity="center"
android:layout_marginLeft="10dp" android:layout_marginLeft="10dp"
android:layout_marginRight="10dp" android:layout_marginRight="10dp"
android:text="@string/careportal_profileswitch" android:text="@string/careportal_profileswitch"
android:textAlignment="center" android:textAlignment="center"
android:textAppearance="?android:attr/textAppearanceLarge" /> android:textAppearance="?android:attr/textAppearanceLarge" />
</LinearLayout> </RelativeLayout>
<LinearLayout
android:id="@+id/spacer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="5dp" />
<RadioGroup
android:id="@+id/actions_care_bgsource"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginBottom="10dp"
android:orientation="horizontal">
<RadioButton
android:id="@+id/actions_care_meter"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="false"
android:text="@string/careportal_newnstreatment_meter" />
<RadioButton
android:id="@+id/actions_care_sensor"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="true"
android:text="@string/careportal_newnstreatment_sensor" />
<RadioButton
android:id="@+id/actions_care_other"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/careportal_newnstreatment_other" />
</RadioGroup>
<LinearLayout <LinearLayout
android:id="@+id/action_care_bg_layout" android:id="@+id/action_care_bg_layout"
@ -75,35 +113,6 @@
</LinearLayout> </LinearLayout>
<RadioGroup
android:id="@+id/actions_care_bgsource"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="10dp"
android:orientation="horizontal">
<RadioButton
android:id="@+id/actions_care_meter"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="false"
android:text="@string/careportal_newnstreatment_meter" />
<RadioButton
android:id="@+id/actions_care_sensor"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="true"
android:text="@string/careportal_newnstreatment_sensor" />
<RadioButton
android:id="@+id/actions_care_other"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/careportal_newnstreatment_other" />
</RadioGroup>
<include layout="@layout/notes" /> <include layout="@layout/notes" />
<include layout="@layout/datetime" /> <include layout="@layout/datetime" />

View file

@ -6,20 +6,20 @@
android:focusableInTouchMode="true" android:focusableInTouchMode="true"
android:minWidth="300dp" android:minWidth="300dp"
android:orientation="vertical" android:orientation="vertical"
android:padding="10dp" tools:context=".dialogs.ExtendedBolusDialog">
tools:context=".plugins.general.actions.dialogs.ExtendedBolusDialog">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"> android:orientation="vertical">
<LinearLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
android:background="@color/dialog_title_backround"
android:orientation="horizontal" android:orientation="horizontal"
android:padding="10dp"> android:padding="5dp">
<ImageView <ImageView
android:layout_width="wrap_content" android:layout_width="wrap_content"
@ -36,8 +36,15 @@
android:text="@string/virtualpump_extendedbolus_label" android:text="@string/virtualpump_extendedbolus_label"
android:textAlignment="center" android:textAlignment="center"
android:textAppearance="?android:attr/textAppearanceLarge" /> android:textAppearance="?android:attr/textAppearanceLarge" />
</LinearLayout>
</RelativeLayout>
<LinearLayout
android:id="@+id/spacer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="5dp" />
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"

View file

@ -6,20 +6,20 @@
android:focusableInTouchMode="true" android:focusableInTouchMode="true"
android:minWidth="300dp" android:minWidth="300dp"
android:orientation="vertical" android:orientation="vertical"
android:padding="10dp" tools:context=".dialogs.FillDialog">
tools:context=".plugins.general.actions.dialogs.FillDialog">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"> android:orientation="vertical">
<LinearLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
android:background="@color/dialog_title_backround"
android:orientation="horizontal" android:orientation="horizontal"
android:padding="10dp"> android:padding="5dp">
<ImageView <ImageView
android:layout_width="wrap_content" android:layout_width="wrap_content"
@ -30,6 +30,7 @@
<TextView <TextView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_gravity="center" android:layout_gravity="center"
android:layout_marginLeft="10dp" android:layout_marginLeft="10dp"
android:layout_marginRight="10dp" android:layout_marginRight="10dp"
@ -37,13 +38,20 @@
android:textAlignment="center" android:textAlignment="center"
android:textAppearance="?android:attr/textAppearanceLarge" /> android:textAppearance="?android:attr/textAppearanceLarge" />
</LinearLayout> </RelativeLayout>
<LinearLayout
android:id="@+id/spacer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="5dp" />
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:orientation="vertical"
android:orientation="vertical"> android:padding="5dp">
<CheckBox <CheckBox
android:id="@+id/fill_catheter_change" android:id="@+id/fill_catheter_change"
@ -60,24 +68,17 @@
</LinearLayout> </LinearLayout>
<View
android:layout_width="fill_parent"
android:layout_height="2dip"
android:layout_marginTop="5dp"
android:layout_marginBottom="5dp"
android:background="@color/listdelimiter" />
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingTop="5dp" android:orientation="horizontal">
android:paddingBottom="5dp">
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:width="120dp" android:width="120dp"
android:padding="10dp"
android:text="@string/overview_insulin_label" android:text="@string/overview_insulin_label"
android:textStyle="bold" /> android:textStyle="bold" />
@ -98,7 +99,8 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content"
android:padding="5dp">
<Button <Button
android:id="@+id/fill_preset_button1" android:id="@+id/fill_preset_button1"

View file

@ -6,20 +6,20 @@
android:focusableInTouchMode="true" android:focusableInTouchMode="true"
android:minWidth="300dp" android:minWidth="300dp"
android:orientation="vertical" android:orientation="vertical"
android:padding="10dp" tools:context=".dialogs.InsulinDialog">
tools:context=".plugins.general.overview.dialogs.InsulinDialog">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"> android:orientation="vertical">
<LinearLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
android:background="@color/dialog_title_backround"
android:orientation="horizontal" android:orientation="horizontal"
android:padding="10dp"> android:padding="5dp">
<ImageView <ImageView
android:layout_width="wrap_content" android:layout_width="wrap_content"
@ -30,6 +30,7 @@
<TextView <TextView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_gravity="center" android:layout_gravity="center"
android:layout_marginLeft="10dp" android:layout_marginLeft="10dp"
android:layout_marginRight="10dp" android:layout_marginRight="10dp"
@ -37,12 +38,19 @@
android:textAlignment="center" android:textAlignment="center"
android:textAppearance="?android:attr/textAppearanceLarge" /> android:textAppearance="?android:attr/textAppearanceLarge" />
</LinearLayout> </RelativeLayout>
<LinearLayout
android:id="@+id/spacer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="5dp" />
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:padding="5dp"
android:orientation="vertical"> android:orientation="vertical">
<CheckBox <CheckBox
@ -60,13 +68,6 @@
</LinearLayout> </LinearLayout>
<View
android:layout_width="fill_parent"
android:layout_height="2dip"
android:layout_marginTop="5dp"
android:layout_marginBottom="5dp"
android:background="@color/listdelimiter" />
<LinearLayout <LinearLayout
android:id="@+id/overview_insulin_time_layout" android:id="@+id/overview_insulin_time_layout"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -137,8 +138,7 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_marginTop="5dp" android:padding="5dp"
android:layout_marginBottom="5dp"
android:orientation="horizontal"> android:orientation="horizontal">
<Button <Button

View file

@ -6,20 +6,20 @@
android:focusableInTouchMode="true" android:focusableInTouchMode="true"
android:minWidth="300dp" android:minWidth="300dp"
android:orientation="vertical" android:orientation="vertical"
android:padding="10dp" tools:context=".dialogs.ProfileSwitchDialog">
tools:context=".plugins.general.overview.dialogs.ProfileSwitchDialog">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"> android:orientation="vertical">
<LinearLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
android:background="@color/dialog_title_backround"
android:orientation="horizontal" android:orientation="horizontal"
android:padding="10dp"> android:padding="5dp">
<ImageView <ImageView
android:layout_width="wrap_content" android:layout_width="wrap_content"
@ -30,6 +30,7 @@
<TextView <TextView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_gravity="center" android:layout_gravity="center"
android:layout_marginLeft="10dp" android:layout_marginLeft="10dp"
android:layout_marginRight="10dp" android:layout_marginRight="10dp"
@ -37,7 +38,14 @@
android:textAlignment="center" android:textAlignment="center"
android:textAppearance="?android:attr/textAppearanceLarge" /> android:textAppearance="?android:attr/textAppearanceLarge" />
</LinearLayout> </RelativeLayout>
<LinearLayout
android:id="@+id/spacer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="5dp" />
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"

View file

@ -6,20 +6,20 @@
android:focusableInTouchMode="true" android:focusableInTouchMode="true"
android:minWidth="300dp" android:minWidth="300dp"
android:orientation="vertical" android:orientation="vertical"
tools:context=".plugins.general.actions.dialogs.TempBasalDialog"> tools:context=".dialogs.TempBasalDialog">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:orientation="vertical">
android:padding="10dp">
<LinearLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
android:background="@color/dialog_title_backround"
android:orientation="horizontal" android:orientation="horizontal"
android:padding="10dp"> android:padding="5dp">
<ImageView <ImageView
android:layout_width="wrap_content" android:layout_width="wrap_content"
@ -30,13 +30,21 @@
<TextView <TextView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_gravity="center" android:layout_gravity="center"
android:layout_marginLeft="10dp" android:layout_marginLeft="10dp"
android:layout_marginRight="10dp" android:layout_marginRight="10dp"
android:text="@string/pump_tempbasal_label" android:text="@string/pump_tempbasal_label"
android:textAlignment="center" android:textAlignment="center"
android:textAppearance="?android:attr/textAppearanceLarge" /> android:textAppearance="?android:attr/textAppearanceLarge" />
</LinearLayout> </RelativeLayout>
<LinearLayout
android:id="@+id/spacer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="5dp" />
<LinearLayout <LinearLayout
android:id="@+id/actions_tempbasal_percent_layout" android:id="@+id/actions_tempbasal_percent_layout"

View file

@ -6,30 +6,31 @@
android:focusableInTouchMode="true" android:focusableInTouchMode="true"
android:minWidth="300dp" android:minWidth="300dp"
android:orientation="vertical" android:orientation="vertical"
android:padding="10dp" tools:context=".dialogs.TempTargetDialog">
tools:context=".plugins.general.overview.dialogs.TempTargetDialog">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"> android:orientation="vertical">
<LinearLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
android:background="@color/dialog_title_backround"
android:orientation="horizontal" android:orientation="horizontal"
android:padding="10dp"> android:padding="5dp">
<ImageView <ImageView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:src="@drawable/icon_actions_temptarget" android:contentDescription="@string/careportal_temporarytarget"
android:contentDescription="@string/careportal_temporarytarget" /> android:src="@drawable/icon_actions_temptarget" />
<TextView <TextView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_gravity="center" android:layout_gravity="center"
android:layout_marginLeft="10dp" android:layout_marginLeft="10dp"
android:layout_marginRight="10dp" android:layout_marginRight="10dp"
@ -37,7 +38,14 @@
android:textAlignment="center" android:textAlignment="center"
android:textAppearance="?android:attr/textAppearanceLarge" /> android:textAppearance="?android:attr/textAppearanceLarge" />
</LinearLayout> </RelativeLayout>
<LinearLayout
android:id="@+id/spacer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="5dp" />
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -47,11 +55,11 @@
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/reason" android:layout_gravity="center_vertical"
android:width="120dp" android:width="120dp"
android:padding="10dp" android:padding="10dp"
android:text="@string/reason"
android:textAppearance="@android:style/TextAppearance.Material.Small" android:textAppearance="@android:style/TextAppearance.Material.Small"
android:layout_gravity="center_vertical"
android:textStyle="bold" /> android:textStyle="bold" />
<Spinner <Spinner
@ -70,11 +78,11 @@
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/nsprofileview_target_label" android:layout_gravity="center_vertical"
android:width="120dp" android:width="120dp"
android:padding="10dp" android:padding="10dp"
android:text="@string/nsprofileview_target_label"
android:textAppearance="@android:style/TextAppearance.Material.Small" android:textAppearance="@android:style/TextAppearance.Material.Small"
android:layout_gravity="center_vertical"
android:textStyle="bold" /> android:textStyle="bold" />
<info.nightscout.androidaps.utils.NumberPicker <info.nightscout.androidaps.utils.NumberPicker
@ -83,6 +91,18 @@
android:layout_height="40dp" android:layout_height="40dp"
android:layout_gravity="center_vertical" /> android:layout_gravity="center_vertical" />
<TextView
android:id="@+id/overview_temptarget_units"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:gravity="start"
android:minWidth="45dp"
android:paddingStart="5dp"
android:paddingEnd="5dp"
android:text="@string/mgdl"
android:textAppearance="?android:attr/textAppearanceSmall" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout

View file

@ -3,19 +3,23 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
tools:context=".plugins.general.overview.dialogs.TreatmentDialog"> android:focusableInTouchMode="true"
android:minWidth="300dp"
android:orientation="vertical"
tools:context=".dialogs.TreatmentDialog">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"> android:orientation="vertical">
<LinearLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
android:background="@color/dialog_title_backround"
android:orientation="horizontal" android:orientation="horizontal"
android:padding="10dp"> android:padding="5dp">
<ImageView <ImageView
android:layout_width="wrap_content" android:layout_width="wrap_content"
@ -26,6 +30,7 @@
<TextView <TextView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_gravity="center" android:layout_gravity="center"
android:layout_marginLeft="10dp" android:layout_marginLeft="10dp"
android:layout_marginRight="10dp" android:layout_marginRight="10dp"
@ -33,12 +38,18 @@
android:textAlignment="center" android:textAlignment="center"
android:textAppearance="?android:attr/textAppearanceLarge" /> android:textAppearance="?android:attr/textAppearanceLarge" />
</LinearLayout> </RelativeLayout>
<LinearLayout
android:id="@+id/spacer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="5dp" />
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center"
android:orientation="vertical"> android:orientation="vertical">
<CheckBox <CheckBox

View file

@ -1,44 +1,54 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:focusableInTouchMode="true" android:focusableInTouchMode="true"
android:minWidth="300dp" android:minWidth="300dp"
android:orientation="vertical" android:orientation="vertical"
android:padding="10dp"> tools:context=".dialogs.InsulinDialog">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"> android:orientation="vertical">
<LinearLayout <RelativeLayout
android:layout_width="wrap_content" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
android:layout_marginBottom="5dp" android:background="@color/dialog_title_backround"
android:orientation="horizontal"> android:orientation="horizontal"
android:padding="5dp">
<ImageView <ImageView
android:layout_width="33dp" android:layout_width="wrap_content"
android:layout_height="match_parent" android:layout_height="match_parent"
app:srcCompat="@drawable/icon_calculator" /> android:contentDescription="@string/boluswizard"
android:src="@drawable/icon_calculator" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_gravity="center" android:layout_gravity="center"
android:layout_marginLeft="10dp" android:layout_marginLeft="10dp"
android:layout_marginRight="10dp" android:layout_marginRight="10dp"
android:text="@string/boluswizard" android:text="@string/boluswizard"
android:textAppearance="?android:attr/textAppearanceLarge" android:textAlignment="center"
android:textColor="@color/colorCalculatorButton" /> android:textAppearance="?android:attr/textAppearanceLarge" />
</LinearLayout> </RelativeLayout>
<LinearLayout
android:id="@+id/spacer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="5dp" />
<TableLayout <TableLayout
android:paddingEnd="5dp"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
@ -65,9 +75,9 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:gravity="left" android:gravity="start"
android:paddingLeft="5dp" android:padding="5dp"
android:text="mg/dl" android:text="@string/mgdl"
android:textAppearance="?android:attr/textAppearanceSmall" /> android:textAppearance="?android:attr/textAppearanceSmall" />
</TableRow> </TableRow>
@ -96,8 +106,8 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:gravity="left" android:gravity="start"
android:paddingLeft="5dp" android:padding="5dp"
android:text="@string/shortgramm" android:text="@string/shortgramm"
android:textAppearance="?android:attr/textAppearanceSmall" /> android:textAppearance="?android:attr/textAppearanceSmall" />
@ -126,8 +136,8 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:gravity="left" android:gravity="start"
android:paddingStart="5dp" android:padding="5dp"
android:text="@string/insulin_unit_shortname" android:text="@string/insulin_unit_shortname"
android:textAppearance="?android:attr/textAppearanceSmall" /> android:textAppearance="?android:attr/textAppearanceSmall" />
@ -156,8 +166,8 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:gravity="left" android:gravity="start"
android:paddingStart="5dp" android:padding="5dp"
android:text="@string/unit_minute_short" android:text="@string/unit_minute_short"
android:textAppearance="?android:attr/textAppearanceSmall" /> android:textAppearance="?android:attr/textAppearanceSmall" />
@ -193,6 +203,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:layout_marginStart="10dp" android:layout_marginStart="10dp"
android:padding="5dp"
android:checked="false" android:checked="false"
android:text="@string/superbolus" /> android:text="@string/superbolus" />
@ -251,7 +262,7 @@
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:layout_weight="1" android:layout_weight="1"
android:autofillHints="@string/careportal_newnstreatment_notes_label" android:autofillHints="@string/careportal_newnstreatment_notes_label"
android:gravity="left" android:gravity="start"
android:inputType="text|textCapSentences" android:inputType="text|textCapSentences"
android:textAppearance="?android:attr/textAppearanceSmall" /> android:textAppearance="?android:attr/textAppearanceSmall" />
@ -261,10 +272,10 @@
android:id="@+id/done_background" android:id="@+id/done_background"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="56dp" android:layout_height="56dp"
android:orientation="horizontal"
android:background="@android:color/transparent"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:paddingBottom="8dp"> android:background="@android:color/transparent"
android:orientation="horizontal"
android:padding="5dp">
<CheckBox <CheckBox
android:id="@+id/treatments_wizard_calculationcheckbox" android:id="@+id/treatments_wizard_calculationcheckbox"
@ -276,27 +287,26 @@
<ImageView <ImageView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:contentDescription="@string/show_calculation"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
app:srcCompat="@drawable/ic_visibility" /> android:src="@drawable/ic_visibility" />
<Button <Button
android:id="@+id/cancel" android:id="@+id/cancel"
style="@style/mdtp_ActionButton.Text" style="@style/mdtp_ActionButton.Text"
android:layout_width="wrap_content" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginEnd="8dp" android:layout_marginEnd="8dp"
android:layout_marginRight="8dp"
android:layout_weight="1" android:layout_weight="1"
android:text="@string/mdtp_cancel" android:text="@string/mdtp_cancel"
android:textAlignment="textEnd" /> android:textAlignment="textEnd" />
<Button <Button
android:id="@+id/ok" android:id="@+id/ok"
style="@style/mdtp_ActionButton.Text"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginRight="16dp"
android:layout_marginEnd="16dp" android:layout_marginEnd="16dp"
style="@style/mdtp_ActionButton.Text"
android:text="@string/mdtp_ok" /> android:text="@string/mdtp_ok" />
</LinearLayout> </LinearLayout>
@ -312,7 +322,8 @@
<TableLayout <TableLayout
android:id="@+id/treatments_wizard_resulttable" android:id="@+id/treatments_wizard_resulttable"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content"
android:padding="5dp">
<TableRow <TableRow
android:layout_width="match_parent" android:layout_width="match_parent"

View file

@ -44,7 +44,7 @@
<color name="mdtp_accent_color">#40bbaa</color> <color name="mdtp_accent_color">#40bbaa</color>
<color name="colorInitializingBorder">#00695c</color> <color name="colorInitializingBorder">#00695c</color>
<color name="dialogtitle">#303030</color> <color name="dialog_title_backround">#303030</color>
<color name="cardColorBackground">#121212</color> <color name="cardColorBackground">#121212</color>
<color name="cardObjectiveText">#779ECB</color> <color name="cardObjectiveText">#779ECB</color>

View file

@ -1685,5 +1685,6 @@
<string name="description_source_randombg">Generate random BG data (Demo mode only)</string> <string name="description_source_randombg">Generate random BG data (Demo mode only)</string>
<string name="randombg_short">BG</string> <string name="randombg_short">BG</string>
<string name="tools">Tools</string> <string name="tools">Tools</string>
<string name="show_calculation">Show calcuation</string>
</resources> </resources>