Search in sources :

Example 1 with MultiwaveBolusMessage

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

the class MultiwaveBolusActivity method onClick.

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

Aggregations

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