- moving classes around a little for init pod
- change text
This commit is contained in:
parent
adf1d892da
commit
9f215e607c
|
@ -11,13 +11,11 @@ import info.nightscout.androidaps.R
|
|||
import info.nightscout.androidaps.activities.NoSplashActivity
|
||||
import info.nightscout.androidaps.events.EventRefreshOverview
|
||||
import info.nightscout.androidaps.plugins.bus.RxBus
|
||||
import info.nightscout.androidaps.plugins.pump.medtronic.dialog.MedtronicHistoryActivity
|
||||
import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.defs.SetupProgress
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.dialogs.wizard.initpod.FullInitPodWizardModel
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.dialogs.wizard.initpod.ShortInitPodWizardModel
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.dialogs.wizard.model.FullInitPodWizardModel
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.dialogs.wizard.model.RemovePodWizardModel
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.dialogs.wizard.model.ShortInitPodWizardModel
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.dialogs.wizard.pages.InitPodRefreshAction
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.dialogs.wizard.removepod.RemovePodWizardModel
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.driver.comm.AapsOmnipodManager
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.events.EventOmnipodPumpValuesChanged
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.util.OmnipodUtil
|
||||
|
@ -89,7 +87,7 @@ class PodManagementActivity : NoSplashActivity() {
|
|||
wizardPagerContext.pagerSettings = pagerSettings
|
||||
val podSessionState = OmnipodUtil.getPodSessionState()
|
||||
val isFullInit = podSessionState == null || podSessionState.setupProgress.isBefore(SetupProgress.PRIMING_FINISHED)
|
||||
if(isFullInit) {
|
||||
if (isFullInit) {
|
||||
wizardPagerContext.wizardModel = FullInitPodWizardModel(applicationContext)
|
||||
} else {
|
||||
wizardPagerContext.wizardModel = ShortInitPodWizardModel(applicationContext)
|
||||
|
|
|
@ -16,7 +16,6 @@ import android.widget.TextView;
|
|||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.atech.android.library.wizardpager.util.WizardPagesUtil;
|
||||
|
||||
import com.tech.freak.wizardpager.model.Page;
|
||||
import com.tech.freak.wizardpager.ui.PageFragmentCallbacks;
|
||||
|
||||
|
@ -27,8 +26,6 @@ import java.util.UUID;
|
|||
|
||||
import info.nightscout.androidaps.R;
|
||||
import info.nightscout.androidaps.data.PumpEnactResult;
|
||||
import info.nightscout.androidaps.plugins.configBuilder.ProfileFunctions;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.driver.comm.AapsOmnipodManager;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.defs.PodInitActionType;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.defs.PodInitReceiver;
|
||||
|
||||
|
@ -108,7 +105,9 @@ public class InitActionFragment extends Fragment implements PodInitReceiver {
|
|||
mapCheckBoxes.put(child, checkBox1);
|
||||
}
|
||||
|
||||
if (podInitActionType==PodInitActionType.DeactivatePodWizardStep) {
|
||||
if (podInitActionType == PodInitActionType.FillCannulaSetBasalProfileWizardStep) {
|
||||
headerView.setText(R.string.omnipod_init_pod_wizard_step4_action_header);
|
||||
} else if (podInitActionType == PodInitActionType.DeactivatePodWizardStep) {
|
||||
headerView.setText(R.string.omnipod_remove_pod_wizard_step2_action_header);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
package info.nightscout.androidaps.plugins.pump.omnipod.dialogs.wizard.initpod;
|
||||
|
||||
import com.atech.android.library.wizardpager.defs.action.AbstractCancelAction;
|
||||
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.driver.comm.AapsOmnipodManager;
|
||||
|
||||
/**
|
||||
* Created by andy on 12/11/2019
|
||||
*/
|
||||
public class InitPodCancelAction extends AbstractCancelAction {
|
||||
@Override
|
||||
public void execute(String cancelReason) {
|
||||
if (cancelReason != null && cancelReason.trim().length() > 0) {
|
||||
this.cancelActionText = cancelReason;
|
||||
}
|
||||
|
||||
if (this.cancelActionText.equals("Cancel")) {
|
||||
//AapsOmnipodManager.getInstance().resetPodStatus();
|
||||
}
|
||||
|
||||
//refreshButtons()
|
||||
|
||||
}
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
package info.nightscout.androidaps.plugins.pump.omnipod.dialogs.wizard.initpod;
|
||||
|
||||
import com.atech.android.library.wizardpager.defs.action.AbstractFinishAction;
|
||||
|
||||
/**
|
||||
* Created by andy on 12/11/2019
|
||||
*/
|
||||
public class InitPodFinishAction extends AbstractFinishAction {
|
||||
@Override
|
||||
public void execute() {
|
||||
// TODO
|
||||
// do refresh of tab
|
||||
}
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package info.nightscout.androidaps.plugins.pump.omnipod.dialogs.wizard.initpod;
|
||||
package info.nightscout.androidaps.plugins.pump.omnipod.dialogs.wizard.model;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
|
@ -7,6 +7,7 @@ import com.tech.freak.wizardpager.model.PageList;
|
|||
|
||||
import info.nightscout.androidaps.R;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.defs.PodInitActionType;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.dialogs.wizard.initpod.InitActionPage;
|
||||
|
||||
/**
|
||||
* Created by andy on 12/11/2019
|
|
@ -1,4 +1,4 @@
|
|||
package info.nightscout.androidaps.plugins.pump.omnipod.dialogs.wizard.initpod;
|
||||
package info.nightscout.androidaps.plugins.pump.omnipod.dialogs.wizard.model;
|
||||
|
||||
import android.content.Context;
|
||||
|
|
@ -14,20 +14,20 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package info.nightscout.androidaps.plugins.pump.omnipod.dialogs.wizard.removepod;
|
||||
package info.nightscout.androidaps.plugins.pump.omnipod.dialogs.wizard.model;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.atech.android.library.wizardpager.model.DisplayTextPage;
|
||||
|
||||
import com.tech.freak.wizardpager.model.AbstractWizardModel;
|
||||
import com.tech.freak.wizardpager.model.PageList;
|
||||
|
||||
import info.nightscout.androidaps.R;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.defs.PodInitActionType;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.dialogs.wizard.pages.PodInfoFragment;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.dialogs.wizard.removepod.RemovePodActionPage;
|
||||
|
||||
/**
|
||||
* Created by andy on 12/11/2019
|
|
@ -1,4 +1,4 @@
|
|||
package info.nightscout.androidaps.plugins.pump.omnipod.dialogs.wizard.initpod;
|
||||
package info.nightscout.androidaps.plugins.pump.omnipod.dialogs.wizard.model;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
|
@ -7,6 +7,7 @@ import com.tech.freak.wizardpager.model.PageList;
|
|||
|
||||
import info.nightscout.androidaps.R;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.defs.PodInitActionType;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.dialogs.wizard.initpod.InitActionPage;
|
||||
|
||||
/**
|
||||
* Created by andy on 12/11/2019
|
|
@ -5,6 +5,8 @@ import android.view.View;
|
|||
|
||||
import com.tech.freak.wizardpager.model.Page;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.defs.PodInitActionType;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.defs.PodInitReceiver;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.dialogs.wizard.initpod.InitActionFragment;
|
||||
|
@ -50,7 +52,7 @@ public class RemoveActionFragment extends InitActionFragment implements PodInitR
|
|||
|
||||
mPage.setActionCompleted(isOk);
|
||||
|
||||
mPage.getData().putString(Page.SIMPLE_DATA_KEY, "ddd");
|
||||
mPage.getData().putString(Page.SIMPLE_DATA_KEY, UUID.randomUUID().toString());
|
||||
mPage.notifyDataChanged();
|
||||
}
|
||||
|
||||
|
@ -67,5 +69,4 @@ public class RemoveActionFragment extends InitActionFragment implements PodInitR
|
|||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -1734,6 +1734,8 @@
|
|||
<string name="omnipod_init_pod_wizard_step3_title">Attach the Pod</string>
|
||||
<string name="omnipod_init_pod_wizard_step3_desc">\nPrepare 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 <b>Cancel</b> and discard your Pod.\n\nPress <b>Next</b> to insert the cannula and begin basal delivery.</string>
|
||||
<string name="omnipod_init_pod_wizard_step4_title">Inserting cannula</string>
|
||||
<string name="omnipod_init_pod_wizard_step4_action_header">Trying to fill cannula and set initial basal schedule.\n\nWhen all items are checked, you can press <b>Next</b>.\n\n<b>Note:</b> please keep the Pod very close to the RileyLink at this time.</string>
|
||||
|
||||
<string name="omnipod_init_pod_wizard_pod_info_title">Pod Info</string>
|
||||
<string name="omnipod_init_pod_wizard_pod_info_init_pod_description">\nThe Pod is now active.\n\nYour basal schedule has been programmed and the cannula has been inserted.\n\nPlease verify that the cannula has been inserted correctly and replace your Pod if you feel hasn\'t.</string>
|
||||
|
||||
|
|
Loading…
Reference in a new issue