Confirmation dialog for activation/deactivation cancel

This commit is contained in:
jbr7rr 2023-07-13 09:35:40 +02:00
parent d93cc51819
commit f66afc8c02
22 changed files with 90 additions and 28 deletions

View file

@ -27,7 +27,7 @@ class MedtrumActivateCompleteFragment : MedtrumBaseFragment<FragmentMedtrumActiv
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState) super.onViewCreated(view, savedInstanceState)
binding.apply { binding.apply {
viewModel = ViewModelProvider(requireActivity(), viewModelFactory).get(MedtrumViewModel::class.java) viewModel = ViewModelProvider(requireActivity(), viewModelFactory)[MedtrumViewModel::class.java]
viewModel?.apply { viewModel?.apply {
setupStep.observe(viewLifecycleOwner) { setupStep.observe(viewLifecycleOwner) {
when (it) { when (it) {

View file

@ -3,6 +3,7 @@ package info.nightscout.pump.medtrum.ui
import android.os.Bundle import android.os.Bundle
import android.view.View import android.view.View
import androidx.lifecycle.ViewModelProvider import androidx.lifecycle.ViewModelProvider
import info.nightscout.core.ui.dialogs.OKDialog
import info.nightscout.core.ui.toast.ToastUtils import info.nightscout.core.ui.toast.ToastUtils
import info.nightscout.pump.medtrum.R import info.nightscout.pump.medtrum.R
import info.nightscout.pump.medtrum.code.PatchStep import info.nightscout.pump.medtrum.code.PatchStep
@ -28,7 +29,7 @@ class MedtrumActivateFragment : MedtrumBaseFragment<FragmentMedtrumActivateBindi
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState) super.onViewCreated(view, savedInstanceState)
binding.apply { binding.apply {
viewModel = ViewModelProvider(requireActivity(), viewModelFactory).get(MedtrumViewModel::class.java) viewModel = ViewModelProvider(requireActivity(), viewModelFactory)[MedtrumViewModel::class.java]
viewModel?.apply { viewModel?.apply {
setupStep.observe(viewLifecycleOwner) { setupStep.observe(viewLifecycleOwner) {
when (it) { when (it) {
@ -51,6 +52,13 @@ class MedtrumActivateFragment : MedtrumBaseFragment<FragmentMedtrumActivateBindi
} }
startActivate() startActivate()
} }
btnNegative.setOnClickListener {
OKDialog.showConfirmation(requireActivity(), rh.gs(R.string.cancel_sure)) {
viewModel?.apply {
moveStep(PatchStep.CANCEL)
}
}
}
} }
} }
} }

View file

@ -3,8 +3,10 @@ package info.nightscout.pump.medtrum.ui
import android.os.Bundle import android.os.Bundle
import android.view.View import android.view.View
import androidx.lifecycle.ViewModelProvider import androidx.lifecycle.ViewModelProvider
import info.nightscout.core.ui.dialogs.OKDialog
import info.nightscout.core.ui.toast.ToastUtils import info.nightscout.core.ui.toast.ToastUtils
import info.nightscout.pump.medtrum.R import info.nightscout.pump.medtrum.R
import info.nightscout.pump.medtrum.code.PatchStep
import info.nightscout.pump.medtrum.databinding.FragmentMedtrumAttachPatchBinding import info.nightscout.pump.medtrum.databinding.FragmentMedtrumAttachPatchBinding
import info.nightscout.pump.medtrum.ui.viewmodel.MedtrumViewModel import info.nightscout.pump.medtrum.ui.viewmodel.MedtrumViewModel
import info.nightscout.rx.logging.AAPSLogger import info.nightscout.rx.logging.AAPSLogger
@ -28,7 +30,7 @@ class MedtrumAttachPatchFragment : MedtrumBaseFragment<FragmentMedtrumAttachPatc
super.onViewCreated(view, savedInstanceState) super.onViewCreated(view, savedInstanceState)
aapsLogger.debug(LTag.PUMP, "MedtrumAttachPatchFragment onViewCreated") aapsLogger.debug(LTag.PUMP, "MedtrumAttachPatchFragment onViewCreated")
binding.apply { binding.apply {
viewModel = ViewModelProvider(requireActivity(), viewModelFactory).get(MedtrumViewModel::class.java) viewModel = ViewModelProvider(requireActivity(), viewModelFactory)[MedtrumViewModel::class.java]
viewModel?.apply { viewModel?.apply {
setupStep.observe(viewLifecycleOwner) { setupStep.observe(viewLifecycleOwner) {
when (it) { when (it) {
@ -42,6 +44,13 @@ class MedtrumAttachPatchFragment : MedtrumBaseFragment<FragmentMedtrumAttachPatc
} }
} }
} }
btnNegative.setOnClickListener {
OKDialog.showConfirmation(requireActivity(), rh.gs(R.string.cancel_sure)) {
viewModel?.apply {
moveStep(PatchStep.CANCEL)
}
}
}
} }
} }
} }

View file

@ -3,6 +3,7 @@ package info.nightscout.pump.medtrum.ui
import android.os.Bundle import android.os.Bundle
import android.view.View import android.view.View
import androidx.lifecycle.ViewModelProvider import androidx.lifecycle.ViewModelProvider
import info.nightscout.core.ui.dialogs.OKDialog
import info.nightscout.pump.medtrum.R import info.nightscout.pump.medtrum.R
import info.nightscout.pump.medtrum.code.PatchStep import info.nightscout.pump.medtrum.code.PatchStep
import info.nightscout.pump.medtrum.databinding.FragmentMedtrumDeactivatePatchBinding import info.nightscout.pump.medtrum.databinding.FragmentMedtrumDeactivatePatchBinding
@ -28,7 +29,7 @@ class MedtrumDeactivatePatchFragment : MedtrumBaseFragment<FragmentMedtrumDeacti
super.onViewCreated(view, savedInstanceState) super.onViewCreated(view, savedInstanceState)
aapsLogger.debug(LTag.PUMP, "MedtrumDeactivatePatchFragment onViewCreated") aapsLogger.debug(LTag.PUMP, "MedtrumDeactivatePatchFragment onViewCreated")
binding.apply { binding.apply {
viewModel = ViewModelProvider(requireActivity(), viewModelFactory).get(MedtrumViewModel::class.java) viewModel = ViewModelProvider(requireActivity(), viewModelFactory)[MedtrumViewModel::class.java]
viewModel?.apply { viewModel?.apply {
setupStep.observe(viewLifecycleOwner) { setupStep.observe(viewLifecycleOwner) {
when (it) { when (it) {
@ -49,6 +50,13 @@ class MedtrumDeactivatePatchFragment : MedtrumBaseFragment<FragmentMedtrumDeacti
} }
deactivatePatch() deactivatePatch()
} }
btnNegative.setOnClickListener {
OKDialog.showConfirmation(requireActivity(), rh.gs(R.string.cancel_sure)) {
viewModel?.apply {
moveStep(PatchStep.CANCEL)
}
}
}
} }
} }
} }

View file

@ -25,7 +25,7 @@ class MedtrumDeactivationCompleteFragment : MedtrumBaseFragment<FragmentMedtrumD
super.onViewCreated(view, savedInstanceState) super.onViewCreated(view, savedInstanceState)
aapsLogger.debug(LTag.PUMP, "MedtrumStartDeactivationFragment onViewCreated") aapsLogger.debug(LTag.PUMP, "MedtrumStartDeactivationFragment onViewCreated")
binding.apply { binding.apply {
viewModel = ViewModelProvider(requireActivity(), viewModelFactory).get(MedtrumViewModel::class.java) viewModel = ViewModelProvider(requireActivity(), viewModelFactory)[MedtrumViewModel::class.java]
viewModel?.apply { viewModel?.apply {
// Nothing to do here (yet) // Nothing to do here (yet)
} }

View file

@ -3,6 +3,7 @@ package info.nightscout.pump.medtrum.ui
import android.os.Bundle import android.os.Bundle
import android.view.View import android.view.View
import androidx.lifecycle.ViewModelProvider import androidx.lifecycle.ViewModelProvider
import info.nightscout.core.ui.dialogs.OKDialog
import info.nightscout.core.ui.toast.ToastUtils import info.nightscout.core.ui.toast.ToastUtils
import info.nightscout.pump.medtrum.R import info.nightscout.pump.medtrum.R
import info.nightscout.pump.medtrum.code.PatchStep import info.nightscout.pump.medtrum.code.PatchStep
@ -29,7 +30,7 @@ class MedtrumPreparePatchConnectFragment : MedtrumBaseFragment<FragmentMedtrumPr
super.onViewCreated(view, savedInstanceState) super.onViewCreated(view, savedInstanceState)
aapsLogger.debug(LTag.PUMP, "MedtrumPreparePatchFragment onViewCreated") aapsLogger.debug(LTag.PUMP, "MedtrumPreparePatchFragment onViewCreated")
binding.apply { binding.apply {
viewModel = ViewModelProvider(requireActivity(), viewModelFactory).get(MedtrumViewModel::class.java) viewModel = ViewModelProvider(requireActivity(), viewModelFactory)[MedtrumViewModel::class.java]
viewModel?.apply { viewModel?.apply {
setupStep.observe(viewLifecycleOwner) { setupStep.observe(viewLifecycleOwner) {
when (it) { when (it) {
@ -46,6 +47,13 @@ class MedtrumPreparePatchConnectFragment : MedtrumBaseFragment<FragmentMedtrumPr
} }
preparePatchConnect() preparePatchConnect()
} }
btnNegative.setOnClickListener {
OKDialog.showConfirmation(requireActivity(), rh.gs(R.string.cancel_sure)) {
viewModel?.apply {
moveStep(PatchStep.CANCEL)
}
}
}
} }
} }
} }

View file

@ -26,7 +26,7 @@ class MedtrumPreparePatchFragment : MedtrumBaseFragment<FragmentMedtrumPreparePa
super.onViewCreated(view, savedInstanceState) super.onViewCreated(view, savedInstanceState)
aapsLogger.debug(LTag.PUMP, "MedtrumPreparePatchFragment onViewCreated") aapsLogger.debug(LTag.PUMP, "MedtrumPreparePatchFragment onViewCreated")
binding.apply { binding.apply {
viewModel = ViewModelProvider(requireActivity(), viewModelFactory).get(MedtrumViewModel::class.java) viewModel = ViewModelProvider(requireActivity(), viewModelFactory)[MedtrumViewModel::class.java]
viewModel?.apply { viewModel?.apply {
preparePatch() preparePatch()
} }

View file

@ -3,8 +3,10 @@ package info.nightscout.pump.medtrum.ui
import android.os.Bundle import android.os.Bundle
import android.view.View import android.view.View
import androidx.lifecycle.ViewModelProvider import androidx.lifecycle.ViewModelProvider
import info.nightscout.core.ui.dialogs.OKDialog
import info.nightscout.core.ui.toast.ToastUtils import info.nightscout.core.ui.toast.ToastUtils
import info.nightscout.pump.medtrum.R import info.nightscout.pump.medtrum.R
import info.nightscout.pump.medtrum.code.PatchStep
import info.nightscout.pump.medtrum.databinding.FragmentMedtrumPrimeCompleteBinding import info.nightscout.pump.medtrum.databinding.FragmentMedtrumPrimeCompleteBinding
import info.nightscout.pump.medtrum.ui.MedtrumBaseFragment import info.nightscout.pump.medtrum.ui.MedtrumBaseFragment
import info.nightscout.pump.medtrum.ui.viewmodel.MedtrumViewModel import info.nightscout.pump.medtrum.ui.viewmodel.MedtrumViewModel
@ -28,7 +30,7 @@ class MedtrumPrimeCompleteFragment : MedtrumBaseFragment<FragmentMedtrumPrimeCom
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState) super.onViewCreated(view, savedInstanceState)
binding.apply { binding.apply {
viewModel = ViewModelProvider(requireActivity(), viewModelFactory).get(MedtrumViewModel::class.java) viewModel = ViewModelProvider(requireActivity(), viewModelFactory)[MedtrumViewModel::class.java]
viewModel?.apply { viewModel?.apply {
setupStep.observe(viewLifecycleOwner) { setupStep.observe(viewLifecycleOwner) {
when (it) { when (it) {
@ -42,6 +44,13 @@ class MedtrumPrimeCompleteFragment : MedtrumBaseFragment<FragmentMedtrumPrimeCom
} }
} }
} }
btnNegative.setOnClickListener {
OKDialog.showConfirmation(requireActivity(), rh.gs(R.string.cancel_sure)) {
viewModel?.apply {
moveStep(PatchStep.CANCEL)
}
}
}
} }
} }
} }

View file

@ -3,8 +3,10 @@ package info.nightscout.pump.medtrum.ui
import android.os.Bundle import android.os.Bundle
import android.view.View import android.view.View
import androidx.lifecycle.ViewModelProvider import androidx.lifecycle.ViewModelProvider
import info.nightscout.core.ui.dialogs.OKDialog
import info.nightscout.core.ui.toast.ToastUtils import info.nightscout.core.ui.toast.ToastUtils
import info.nightscout.pump.medtrum.R import info.nightscout.pump.medtrum.R
import info.nightscout.pump.medtrum.code.PatchStep
import info.nightscout.pump.medtrum.databinding.FragmentMedtrumPrimeBinding import info.nightscout.pump.medtrum.databinding.FragmentMedtrumPrimeBinding
import info.nightscout.pump.medtrum.ui.MedtrumBaseFragment import info.nightscout.pump.medtrum.ui.MedtrumBaseFragment
import info.nightscout.pump.medtrum.ui.viewmodel.MedtrumViewModel import info.nightscout.pump.medtrum.ui.viewmodel.MedtrumViewModel
@ -28,7 +30,7 @@ class MedtrumPrimeFragment : MedtrumBaseFragment<FragmentMedtrumPrimeBinding>()
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState) super.onViewCreated(view, savedInstanceState)
binding.apply { binding.apply {
viewModel = ViewModelProvider(requireActivity(), viewModelFactory).get(MedtrumViewModel::class.java) viewModel = ViewModelProvider(requireActivity(), viewModelFactory)[MedtrumViewModel::class.java]
viewModel?.apply { viewModel?.apply {
setupStep.observe(viewLifecycleOwner) { setupStep.observe(viewLifecycleOwner) {
when (it) { when (it) {
@ -42,6 +44,13 @@ class MedtrumPrimeFragment : MedtrumBaseFragment<FragmentMedtrumPrimeBinding>()
} }
} }
} }
btnNegative.setOnClickListener {
OKDialog.showConfirmation(requireActivity(), rh.gs(R.string.cancel_sure)) {
viewModel?.apply {
moveStep(PatchStep.CANCEL)
}
}
}
} }
} }
} }

View file

@ -3,6 +3,7 @@ package info.nightscout.pump.medtrum.ui
import android.os.Bundle import android.os.Bundle
import android.view.View import android.view.View
import androidx.lifecycle.ViewModelProvider import androidx.lifecycle.ViewModelProvider
import info.nightscout.core.ui.dialogs.OKDialog
import info.nightscout.core.ui.toast.ToastUtils import info.nightscout.core.ui.toast.ToastUtils
import info.nightscout.pump.medtrum.R import info.nightscout.pump.medtrum.R
import info.nightscout.pump.medtrum.code.PatchStep import info.nightscout.pump.medtrum.code.PatchStep
@ -29,7 +30,7 @@ class MedtrumPrimingFragment : MedtrumBaseFragment<FragmentMedtrumPrimingBinding
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState) super.onViewCreated(view, savedInstanceState)
binding.apply { binding.apply {
viewModel = ViewModelProvider(requireActivity(), viewModelFactory).get(MedtrumViewModel::class.java) viewModel = ViewModelProvider(requireActivity(), viewModelFactory)[MedtrumViewModel::class.java]
viewModel?.apply { viewModel?.apply {
setupStep.observe(viewLifecycleOwner) { setupStep.observe(viewLifecycleOwner) {
when (it) { when (it) {
@ -54,6 +55,13 @@ class MedtrumPrimingFragment : MedtrumBaseFragment<FragmentMedtrumPrimingBinding
} }
startPrime() startPrime()
} }
btnNegative.setOnClickListener {
OKDialog.showConfirmation(requireActivity(), rh.gs(R.string.cancel_sure)) {
viewModel?.apply {
moveStep(PatchStep.CANCEL)
}
}
}
} }
} }
} }

View file

@ -3,6 +3,7 @@ package info.nightscout.pump.medtrum.ui
import android.os.Bundle import android.os.Bundle
import android.view.View import android.view.View
import androidx.lifecycle.ViewModelProvider import androidx.lifecycle.ViewModelProvider
import info.nightscout.core.ui.dialogs.OKDialog
import info.nightscout.pump.medtrum.R import info.nightscout.pump.medtrum.R
import info.nightscout.pump.medtrum.code.PatchStep import info.nightscout.pump.medtrum.code.PatchStep
import info.nightscout.pump.medtrum.databinding.FragmentMedtrumRetryActivationConnectBinding import info.nightscout.pump.medtrum.databinding.FragmentMedtrumRetryActivationConnectBinding
@ -10,11 +11,13 @@ import info.nightscout.pump.medtrum.ui.MedtrumBaseFragment
import info.nightscout.pump.medtrum.ui.viewmodel.MedtrumViewModel import info.nightscout.pump.medtrum.ui.viewmodel.MedtrumViewModel
import info.nightscout.rx.logging.AAPSLogger import info.nightscout.rx.logging.AAPSLogger
import info.nightscout.rx.logging.LTag import info.nightscout.rx.logging.LTag
import info.nightscout.shared.interfaces.ResourceHelper
import javax.inject.Inject import javax.inject.Inject
class MedtrumRetryActivationConnectFragment : MedtrumBaseFragment<FragmentMedtrumRetryActivationConnectBinding>() { class MedtrumRetryActivationConnectFragment : MedtrumBaseFragment<FragmentMedtrumRetryActivationConnectBinding>() {
@Inject lateinit var aapsLogger: AAPSLogger @Inject lateinit var aapsLogger: AAPSLogger
@Inject lateinit var rh: ResourceHelper
companion object { companion object {
@ -27,7 +30,7 @@ class MedtrumRetryActivationConnectFragment : MedtrumBaseFragment<FragmentMedtru
super.onViewCreated(view, savedInstanceState) super.onViewCreated(view, savedInstanceState)
aapsLogger.debug(LTag.PUMP, "MedtrumRetryActivationConnectFragment onViewCreated") aapsLogger.debug(LTag.PUMP, "MedtrumRetryActivationConnectFragment onViewCreated")
binding.apply { binding.apply {
viewModel = ViewModelProvider(requireActivity(), viewModelFactory).get(MedtrumViewModel::class.java) viewModel = ViewModelProvider(requireActivity(), viewModelFactory)[MedtrumViewModel::class.java]
viewModel?.apply { viewModel?.apply {
setupStep.observe(viewLifecycleOwner) { setupStep.observe(viewLifecycleOwner) {
@ -45,6 +48,13 @@ class MedtrumRetryActivationConnectFragment : MedtrumBaseFragment<FragmentMedtru
} }
retryActivationConnect() retryActivationConnect()
} }
btnNegative.setOnClickListener {
OKDialog.showConfirmation(requireActivity(), rh.gs(R.string.cancel_sure)) {
viewModel?.apply {
moveStep(PatchStep.CANCEL)
}
}
}
} }
} }
} }

View file

@ -30,7 +30,7 @@ class MedtrumRetryActivationFragment : MedtrumBaseFragment<FragmentMedtrumRetryA
super.onViewCreated(view, savedInstanceState) super.onViewCreated(view, savedInstanceState)
aapsLogger.debug(LTag.PUMP, "MedtrumRetryActivationFragment onViewCreated") aapsLogger.debug(LTag.PUMP, "MedtrumRetryActivationFragment onViewCreated")
binding.apply { binding.apply {
viewModel = ViewModelProvider(requireActivity(), viewModelFactory).get(MedtrumViewModel::class.java) viewModel = ViewModelProvider(requireActivity(), viewModelFactory)[MedtrumViewModel::class.java]
viewModel?.apply { viewModel?.apply {
preparePatch() // Use this to make sure we are disconnceted at this stage preparePatch() // Use this to make sure we are disconnceted at this stage
} }

View file

@ -30,7 +30,7 @@ class MedtrumStartDeactivationFragment : MedtrumBaseFragment<FragmentMedtrumStar
super.onViewCreated(view, savedInstanceState) super.onViewCreated(view, savedInstanceState)
aapsLogger.debug(LTag.PUMP, "MedtrumStartDeactivationFragment onViewCreated") aapsLogger.debug(LTag.PUMP, "MedtrumStartDeactivationFragment onViewCreated")
binding.apply { binding.apply {
viewModel = ViewModelProvider(requireActivity(), viewModelFactory).get(MedtrumViewModel::class.java) viewModel = ViewModelProvider(requireActivity(), viewModelFactory)[MedtrumViewModel::class.java]
viewModel?.apply { viewModel?.apply {
updateSetupStep(MedtrumViewModel.SetupStep.START_DEACTIVATION) updateSetupStep(MedtrumViewModel.SetupStep.START_DEACTIVATION)
} }

View file

@ -55,8 +55,7 @@
android:text="@string/cancel" android:text="@string/cancel"
app:layout_constraintEnd_toStartOf="@id/btn_positive" app:layout_constraintEnd_toStartOf="@id/btn_positive"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent" />
app:onSafeClick="@{() -> viewModel.moveStep(PatchStep.CANCEL)}" />
<Button <Button
android:id="@+id/btn_positive" android:id="@+id/btn_positive"

View file

@ -70,8 +70,7 @@
android:text="@string/cancel" android:text="@string/cancel"
app:layout_constraintEnd_toStartOf="@id/btn_positive" app:layout_constraintEnd_toStartOf="@id/btn_positive"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent" />
app:onSafeClick="@{() -> viewModel.moveStep(PatchStep.CANCEL)}" />
<Button <Button
android:id="@+id/btn_positive" android:id="@+id/btn_positive"

View file

@ -57,7 +57,6 @@
app:layout_constraintEnd_toStartOf="@id/btn_positive" app:layout_constraintEnd_toStartOf="@id/btn_positive"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:onSafeClick="@{() -> viewModel.moveStep(PatchStep.CANCEL)}"
tools:visibility="visible" /> tools:visibility="visible" />
<Button <Button

View file

@ -85,8 +85,7 @@
android:text="@string/cancel" android:text="@string/cancel"
app:layout_constraintEnd_toStartOf="@id/btn_positive" app:layout_constraintEnd_toStartOf="@id/btn_positive"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent" />
app:onSafeClick="@{() -> viewModel.moveStep(PatchStep.CANCEL)}" />
<Button <Button
android:id="@+id/btn_positive" android:id="@+id/btn_positive"

View file

@ -72,8 +72,7 @@
android:text="@string/cancel" android:text="@string/cancel"
app:layout_constraintEnd_toStartOf="@id/btn_positive" app:layout_constraintEnd_toStartOf="@id/btn_positive"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent" />
app:onSafeClick="@{() -> viewModel.moveStep(PatchStep.CANCEL)}" />
<Button <Button
android:id="@+id/btn_positive" android:id="@+id/btn_positive"

View file

@ -72,8 +72,7 @@
android:text="@string/cancel" android:text="@string/cancel"
app:layout_constraintEnd_toStartOf="@id/btn_positive" app:layout_constraintEnd_toStartOf="@id/btn_positive"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent" />
app:onSafeClick="@{() -> viewModel.moveStep(PatchStep.CANCEL)}" />
<Button <Button
android:id="@+id/btn_positive" android:id="@+id/btn_positive"

View file

@ -83,8 +83,7 @@
android:text="@string/cancel" android:text="@string/cancel"
app:layout_constraintEnd_toStartOf="@id/btn_positive" app:layout_constraintEnd_toStartOf="@id/btn_positive"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent" />
app:onSafeClick="@{() -> viewModel.moveStep(PatchStep.CANCEL)}" />
<Button <Button
android:id="@+id/btn_positive" android:id="@+id/btn_positive"

View file

@ -55,8 +55,7 @@
android:contentDescription="@string/cancel" android:contentDescription="@string/cancel"
android:text="@string/cancel" android:text="@string/cancel"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent" />
app:onSafeClick="@{() -> viewModel.moveStep(PatchStep.CANCEL)}" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>

View file

@ -115,6 +115,7 @@
<string name="press_OK_to_return">Press <b>OK</b> to return to main screen.</string> <string name="press_OK_to_return">Press <b>OK</b> to return to main screen.</string>
<string name="deactivate_sure">Are you sure that you want to deactivate the current patch?</string> <string name="deactivate_sure">Are you sure that you want to deactivate the current patch?</string>
<string name="cancel_sure">Are you sure that you want to cancel the activation?</string>
<string name="medtrum_deactivate_pump_confirm">Are you sure? This action cannot be reversed!!</string> <string name="medtrum_deactivate_pump_confirm">Are you sure? This action cannot be reversed!!</string>
<string name="press_next_or_cancel">Press <b>Next</b> to deactivate or <b>Cancel</b> to return to main screen.</string> <string name="press_next_or_cancel">Press <b>Next</b> to deactivate or <b>Cancel</b> to return to main screen.</string>
<string name="deactivating_pump">Deactivating patch. Please Wait.</string> <string name="deactivating_pump">Deactivating patch. Please Wait.</string>