diff --git a/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/ui/wizard/activation/fragment/AttachPodInfoFragment.kt b/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/ui/wizard/activation/fragment/AttachPodInfoFragment.kt index 032f71d335..5642750a20 100644 --- a/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/ui/wizard/activation/fragment/AttachPodInfoFragment.kt +++ b/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/ui/wizard/activation/fragment/AttachPodInfoFragment.kt @@ -1,9 +1,14 @@ package info.nightscout.androidaps.plugins.pump.omnipod.ui.wizard.activation.fragment +import android.app.AlertDialog +import android.os.Bundle +import android.view.View import androidx.annotation.IdRes import androidx.annotation.StringRes +import androidx.navigation.fragment.findNavController import info.nightscout.androidaps.plugins.pump.omnipod.R import info.nightscout.androidaps.plugins.pump.omnipod.ui.wizard.common.fragment.InfoFragmentBase +import kotlinx.android.synthetic.main.omnipod_wizard_nav_buttons.* class AttachPodInfoFragment : InfoFragmentBase() { @StringRes @@ -16,4 +21,18 @@ class AttachPodInfoFragment : InfoFragmentBase() { override fun getNextPageActionId(): Int = R.id.action_attachPodInfoFragment_to_insertCannulaActionFragment override fun getIndex(): Int = 3 + + override fun onViewCreated(view: View, savedInstanceState: Bundle?) { + super.onViewCreated(view, savedInstanceState) + + omnipod_wizard_button_next.setOnClickListener { + AlertDialog.Builder(context) + .setIcon(android.R.drawable.ic_dialog_alert) + .setTitle(getString(getTitleId())) + .setMessage(getString(R.string.omnipod_pod_activation_wizard_attach_pod_confirm_insert_cannula_text)) + .setPositiveButton(getString(R.string.omnipod_ok)) { _, _ -> findNavController().navigate(getNextPageActionId()) } + .setNegativeButton(getString(R.string.omnipod_cancel), null) + .show() + } + } } \ No newline at end of file diff --git a/omnipod/src/main/res/values/strings.xml b/omnipod/src/main/res/values/strings.xml index 3822f3b6f3..62ab50b16c 100644 --- a/omnipod/src/main/res/values/strings.xml +++ b/omnipod/src/main/res/values/strings.xml @@ -183,6 +183,7 @@ Trying to pair with the new Pod and prime it.\n\nWhen the initialization process has successfully been completed, you can press Next.\n\nNote: please place the RileyLink in an upright position and place the Pod a few inches away from it. Attach Pod Prepare the infusion site. Remove the Pod\'s needle cap and adhesive backing and attach the Pod to the infusion site.\n\nIf the cannula sticks out, please press Cancel and discard your Pod.\n\nPress Next to insert the cannula and begin basal delivery. + When you press OK, the cannula will be inserted. Make sure that you have attached the Pod to the infusion site. Insert cannula Trying to set initial basal schedule and insert the cannula.\n\nWhen the cannula has successfully been inserted, you can press Next. Pod activated @@ -235,6 +236,8 @@ Pulse Log (copied to clipboard) Yes No + OK + Cancel Moments ago