Search in sources :

Example 1 with SetTBRTaskRunner

use of sugar.free.sightremote.taskrunners.SetTBRTaskRunner in project SightRemote by TebbeUbben.

the class TemporaryBasalRateActivity method onClick.

@Override
public void onClick(View v) {
    int duration = durationPicker.getPickerValue();
    int amount = percentage.getValue() * 10;
    SetTBRTaskRunner taskRunner = new SetTBRTaskRunner(getServiceConnector(), amount, duration);
    (confirmationDialog = new ConfirmationDialog(this, HTMLUtil.getHTML(R.string.tbr_confirmation, amount, UnitFormatter.formatDuration(duration)), () -> {
        showManualOverlay();
        showLoadingIndicator();
        taskRunner.fetch(TemporaryBasalRateActivity.this);
    })).show();
}
Also used : SetTBRTaskRunner(sugar.free.sightremote.taskrunners.SetTBRTaskRunner) ConfirmationDialog(sugar.free.sightremote.dialogs.ConfirmationDialog)

Aggregations

ConfirmationDialog (sugar.free.sightremote.dialogs.ConfirmationDialog)1 SetTBRTaskRunner (sugar.free.sightremote.taskrunners.SetTBRTaskRunner)1