Search in sources :

Example 1 with ExtendedBolusMessage

use of sugar.free.sightparser.applayer.messages.remote_control.ExtendedBolusMessage in project SightRemote by TebbeUbben.

the class ExtendedBolusActivity method onClick.

@Override
public void onClick(View view) {
    ExtendedBolusMessage message = new ExtendedBolusMessage();
    message.setAmount(bolusAmountPicker.getPickerValue());
    message.setDuration(durationPicker.getPickerValue());
    SingleMessageTaskRunner taskRunner = new SingleMessageTaskRunner(getServiceConnector(), message);
    (confirmationDialog = new ConfirmationDialog(this, HTMLUtil.getHTML(R.string.extended_bolus_confirmation, UnitFormatter.formatUnits(bolusAmountPicker.getPickerValue()), UnitFormatter.formatDuration(durationPicker.getPickerValue())), () -> {
        showLoadingIndicator();
        taskRunner.fetch(ExtendedBolusActivity.this);
    })).show();
}
Also used : ExtendedBolusMessage(sugar.free.sightparser.applayer.messages.remote_control.ExtendedBolusMessage) SingleMessageTaskRunner(sugar.free.sightparser.handling.SingleMessageTaskRunner) ConfirmationDialog(sugar.free.sightremote.dialogs.ConfirmationDialog)

Aggregations

ExtendedBolusMessage (sugar.free.sightparser.applayer.messages.remote_control.ExtendedBolusMessage)1 SingleMessageTaskRunner (sugar.free.sightparser.handling.SingleMessageTaskRunner)1 ConfirmationDialog (sugar.free.sightremote.dialogs.ConfirmationDialog)1