CarbsButton: replace suspend option with 'hypo tt'.

This commit is contained in:
Johannes Mockenhaupt 2018-03-17 22:07:00 +01:00
parent eae6c73671
commit b54a010614
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1
6 changed files with 230 additions and 121 deletions

View file

@ -41,10 +41,13 @@ public class Constants {
// Temp targets
public static final int defaultActivityTTDuration = 90; // min
public static final double defaultActivityTTmgdl = 90d;
public static final double defaultActivityTTmmol = 5d;
public static final double defaultActivityTTmmol = 8d;
public static final int defaultEatingSoonTTDuration = 45; // min
public static final double defaultEatingSoonTTmgdl = 140d;
public static final double defaultEatingSoonTTmmol = 8d;
public static final double defaultEatingSoonTTmmol = 5d;
public static final int defaultHypoTTDuration = 30; // min
public static final double defaultHypoTTmgdl = 120d;
public static final double defaultHypoTTmmol = 6.5d;
//NSClientInternal
public static final int MAX_LOG_LINES = 100;

View file

@ -17,7 +17,8 @@ import android.view.ViewGroup;
import android.view.Window;
import android.view.WindowManager;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.RadioButton;
import android.widget.TextView;
import com.google.common.base.Joiner;
@ -25,7 +26,6 @@ import com.wdullaer.materialdatetimepicker.date.DatePickerDialog;
import com.wdullaer.materialdatetimepicker.time.RadialPickerLayout;
import com.wdullaer.materialdatetimepicker.time.TimePickerDialog;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -44,7 +44,6 @@ import info.nightscout.androidaps.db.CareportalEvent;
import info.nightscout.androidaps.db.Source;
import info.nightscout.androidaps.db.TempTarget;
import info.nightscout.androidaps.plugins.ConfigBuilder.ConfigBuilderPlugin;
import info.nightscout.androidaps.plugins.Loop.LoopPlugin;
import info.nightscout.androidaps.queue.Callback;
import info.nightscout.utils.DateUtil;
import info.nightscout.utils.DecimalFormatter;
@ -53,7 +52,7 @@ import info.nightscout.utils.SP;
import info.nightscout.utils.SafeParse;
import info.nightscout.utils.ToastUtils;
public class NewCarbsDialog extends DialogFragment implements OnClickListener, DatePickerDialog.OnDateSetListener, TimePickerDialog.OnTimeSetListener {
public class NewCarbsDialog extends DialogFragment implements OnClickListener, DatePickerDialog.OnDateSetListener, TimePickerDialog.OnTimeSetListener, CompoundButton.OnCheckedChangeListener {
private static Logger log = LoggerFactory.getLogger(NewCarbsDialog.class);
private NumberPicker editCarbs;
@ -71,9 +70,10 @@ public class NewCarbsDialog extends DialogFragment implements OnClickListener, D
private static final int FAV1_DEFAULT = 5;
private static final int FAV2_DEFAULT = 10;
private static final int FAV3_DEFAULT = 20;
private CheckBox suspendLoopCheckbox;
private CheckBox startActivityTTCheckbox;
private CheckBox startEatingSoonTTCheckbox;
private RadioButton startActivityTTCheckbox;
private RadioButton startEatingSoonTTCheckbox;
private RadioButton startHypoTTCheckbox;
private boolean togglingTT;
private Integer maxCarbs;
@ -127,7 +127,11 @@ public class NewCarbsDialog extends DialogFragment implements OnClickListener, D
editCarbs.setParams(0d, 0d, (double) maxCarbs, 1d, new DecimalFormat("0"), false, textWatcher);
startActivityTTCheckbox = view.findViewById(R.id.newcarbs_activity_tt);
startEatingSoonTTCheckbox = view.findViewById(R.id.carbs_eating_soon_tt);
startActivityTTCheckbox.setOnCheckedChangeListener(this);
startEatingSoonTTCheckbox = view.findViewById(R.id.newcarbs_eating_soon_tt);
startEatingSoonTTCheckbox.setOnCheckedChangeListener(this);
startHypoTTCheckbox = view.findViewById(R.id.newcarbs_hypo_tt);
startHypoTTCheckbox.setOnCheckedChangeListener(this);
dateButton = view.findViewById(R.id.newcarbs_eventdate);
timeButton = view.findViewById(R.id.newcarb_eventtime);
@ -139,10 +143,6 @@ public class NewCarbsDialog extends DialogFragment implements OnClickListener, D
dateButton.setOnClickListener(this);
timeButton.setOnClickListener(this);
//To be able to select only one TT at a time
startEatingSoonTTCheckbox.setOnClickListener(this);
startActivityTTCheckbox.setOnClickListener(this);
fav1Button = view.findViewById(R.id.newcarbs_plus1);
fav1Button.setOnClickListener(this);
fav1Button.setText(toSignedString(SP.getInt(R.string.key_carbs_button_increment_1, FAV1_DEFAULT)));
@ -155,8 +155,6 @@ public class NewCarbsDialog extends DialogFragment implements OnClickListener, D
fav3Button.setOnClickListener(this);
fav3Button.setText(toSignedString(SP.getInt(R.string.key_carbs_button_increment_3, FAV3_DEFAULT)));
suspendLoopCheckbox = view.findViewById(R.id.newcarbs_suspend_loop);
setCancelable(true);
getDialog().setCanceledOnTouchOutside(false);
return view;
@ -215,12 +213,84 @@ public class NewCarbsDialog extends DialogFragment implements OnClickListener, D
validateInputs();
break;
case R.id.newcarbs_activity_tt:
startEatingSoonTTCheckbox.setChecked(false);
break;
case R.id.carbs_eating_soon_tt:
if (togglingTT) {
togglingTT = false;
break;
}
startActivityTTCheckbox.setOnClickListener(null);
startActivityTTCheckbox.setOnCheckedChangeListener(null);
startActivityTTCheckbox.setChecked(false);
startActivityTTCheckbox.setOnCheckedChangeListener(this);
break;
case R.id.newcarbs_eating_soon_tt:
if (togglingTT) {
togglingTT = false;
break;
}
startEatingSoonTTCheckbox.setOnClickListener(null);
startEatingSoonTTCheckbox.setOnCheckedChangeListener(null);
startEatingSoonTTCheckbox.setChecked(false);
startEatingSoonTTCheckbox.setOnCheckedChangeListener(this);
break;
case R.id.newcarbs_hypo_tt:
if (togglingTT) {
togglingTT = false;
break;
}
startHypoTTCheckbox.setOnClickListener(null);
startHypoTTCheckbox.setOnCheckedChangeListener(null);
startHypoTTCheckbox.setChecked(false);
startHypoTTCheckbox.setOnCheckedChangeListener(this);
break;
}
}
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
// Logic to disable a selected radio when pressed. When a checked radio
// is pressed, no CheckChanged event is trigger, so register a Click event
// when checking a radio. Since Click events come after CheckChanged events,
// the Click event is triggered immediately after this. Thus, set toggingTT
// var to true, so that the first Click event fired after this is ignored.
// Radios remove themselves from Click events once unchecked.
// Since radios are not in a group, manually update their state.
switch (buttonView.getId()) {
case R.id.newcarbs_activity_tt:
togglingTT = true;
startActivityTTCheckbox.setOnClickListener(this);
startEatingSoonTTCheckbox.setOnCheckedChangeListener(null);
startEatingSoonTTCheckbox.setChecked(false);
startEatingSoonTTCheckbox.setOnCheckedChangeListener(this);
startHypoTTCheckbox.setOnCheckedChangeListener(null);
startHypoTTCheckbox.setChecked(false);
startHypoTTCheckbox.setOnCheckedChangeListener(this);
break;
case R.id.newcarbs_eating_soon_tt:
togglingTT = true;
startEatingSoonTTCheckbox.setOnClickListener(this);
startActivityTTCheckbox.setOnCheckedChangeListener(null);
startActivityTTCheckbox.setChecked(false);
startActivityTTCheckbox.setOnCheckedChangeListener(this);
startHypoTTCheckbox.setOnCheckedChangeListener(null);
startHypoTTCheckbox.setChecked(false);
startHypoTTCheckbox.setOnCheckedChangeListener(this);
break;
case R.id.newcarbs_hypo_tt:
togglingTT = true;
startHypoTTCheckbox.setOnClickListener(this);
startActivityTTCheckbox.setOnCheckedChangeListener(null);
startActivityTTCheckbox.setChecked(false);
startActivityTTCheckbox.setOnCheckedChangeListener(this);
startEatingSoonTTCheckbox.setOnCheckedChangeListener(null);
startEatingSoonTTCheckbox.setChecked(false);
startEatingSoonTTCheckbox.setOnCheckedChangeListener(this);
break;
}
}
@ -240,9 +310,6 @@ public class NewCarbsDialog extends DialogFragment implements OnClickListener, D
actions.add(MainApp.gs(R.string.carbs) + ": " + "<font color='" + MainApp.gc(R.color.colorCarbsButton) + "'>" + carbsAfterConstraints + "g" + "</font>");
if (!carbsAfterConstraints.equals(carbs))
actions.add("<font color='" + MainApp.gc(R.color.low) + "'>" + MainApp.gs(R.string.carbsconstraintapplied) + "</font>");
if (suspendLoopCheckbox.isChecked()) {
actions.add(MainApp.gs(R.string.loop) + ": " + "<font color='" + MainApp.gc(R.color.low) + "'>" + MainApp.gs(R.string.suspendloopfor30min) + "</font>");
}
final Profile currentProfile = MainApp.getConfigBuilder().getProfile();
if (currentProfile == null)
@ -258,6 +325,11 @@ public class NewCarbsDialog extends DialogFragment implements OnClickListener, D
double eatingSoonTT = SP.getDouble(R.string.key_eatingsoon_target, currentProfile.getUnits().equals(Constants.MMOL) ? Constants.defaultEatingSoonTTmmol : Constants.defaultEatingSoonTTmgdl);
eatingSoonTT = eatingSoonTT > 0 ? eatingSoonTT : currentProfile.getUnits().equals(Constants.MMOL) ? Constants.defaultEatingSoonTTmmol : Constants.defaultEatingSoonTTmgdl;
int hypoTTDuration = SP.getInt(R.string.key_hypo_duration, Constants.defaultHypoTTDuration);
hypoTTDuration = hypoTTDuration > 0 ? hypoTTDuration : Constants.defaultHypoTTDuration;
double hypoTT = SP.getDouble(R.string.key_hypo_target, currentProfile.getUnits().equals(Constants.MMOL) ? Constants.defaultHypoTTmmol : Constants.defaultHypoTTmgdl);
hypoTT = hypoTT > 0 ? hypoTT : currentProfile.getUnits().equals(Constants.MMOL) ? Constants.defaultHypoTTmmol : Constants.defaultHypoTTmgdl;
if (startActivityTTCheckbox.isChecked()) {
if (currentProfile.getUnits().equals(Constants.MMOL)) {
actions.add(MainApp.gs(R.string.temptargetshort) + ": " + "<font color='" + MainApp.gc(R.color.high) + "'>" + DecimalFormatter.to1Decimal(activityTT) + " mmol/l (" + activityTTDuration + " min)</font>");
@ -265,107 +337,109 @@ public class NewCarbsDialog extends DialogFragment implements OnClickListener, D
actions.add(MainApp.gs(R.string.temptargetshort) + ": " + "<font color='" + MainApp.gc(R.color.high) + "'>" + DecimalFormatter.to0Decimal(activityTT) + " mg/dl (" + activityTTDuration + " min)</font>");
}
if (startEatingSoonTTCheckbox.isChecked() && !startActivityTTCheckbox.isChecked()) {
if (startEatingSoonTTCheckbox.isChecked()) {
if (currentProfile.getUnits().equals(Constants.MMOL)) {
actions.add(MainApp.gs(R.string.temptargetshort) + ": " + "<font color='" + MainApp.gc(R.color.high) + "'>" + DecimalFormatter.to1Decimal(eatingSoonTT) + " mmol/l (" + eatingSoonTTDuration + " min)</font>");
} else
actions.add(MainApp.gs(R.string.temptargetshort) + ": " + "<font color='" + MainApp.gc(R.color.high) + "'>" + DecimalFormatter.to0Decimal(eatingSoonTT) + " mg/dl (" + eatingSoonTTDuration + " min)</font>");
}
if (startHypoTTCheckbox.isChecked()) {
if (currentProfile.getUnits().equals(Constants.MMOL)) {
actions.add(MainApp.gs(R.string.temptargetshort) + ": " + "<font color='" + MainApp.gc(R.color.high) + "'>" + DecimalFormatter.to1Decimal(hypoTT) + " mmol/l (" + hypoTTDuration + " min)</font>");
} else
actions.add(MainApp.gs(R.string.temptargetshort) + ": " + "<font color='" + MainApp.gc(R.color.high) + "'>" + DecimalFormatter.to0Decimal(hypoTT) + " mg/dl (" + hypoTTDuration + " min)</font>");
}
final double finalActivityTT = activityTT;
final double finalEatigSoonTT = eatingSoonTT;
final int finalActivityTTDuration = activityTTDuration;
final double finalEatigSoonTT = eatingSoonTT;
final int finalEatingSoonTTDuration = eatingSoonTTDuration;
final double finalHypoTT = hypoTT;
final int finalHypoTTDuration = hypoTTDuration;
if (!initialEventTime.equals(eventTime)) {
actions.add("Time: " + DateUtil.dateAndTimeString(eventTime));
}
final int finalCarbsAfterConstraints = carbsAfterConstraints;
final int finalCarbsAfterConstraints = carbsAfterConstraints;
final Context context = getContext();
final AlertDialog.Builder builder = new AlertDialog.Builder(context);
final Context context = getContext();
final AlertDialog.Builder builder = new AlertDialog.Builder(context);
builder.setTitle(MainApp.gs(R.string.confirmation));
builder.setMessage(actions.isEmpty()
? MainApp.gs(R.string.no_action_selected)
: Html.fromHtml(Joiner.on("<br/>").join(actions)));
builder.setPositiveButton(MainApp.gs(R.string.ok), actions.isEmpty() ? null : (dialog, id) -> {
synchronized (builder) {
if (accepted) {
log.debug("guarding: already accepted");
return;
}
accepted = true;
builder.setTitle(MainApp.gs(R.string.confirmation));
builder.setMessage(actions.isEmpty()
? MainApp.gs(R.string.no_action_selected)
: Html.fromHtml(Joiner.on("<br/>").join(actions)));
builder.setPositiveButton(MainApp.gs(R.string.ok), actions.isEmpty() ? null : (dialog, id) -> {
synchronized (builder) {
if (accepted) {
log.debug("guarding: already accepted");
return;
}
accepted = true;
if (startActivityTTCheckbox.isChecked()) {
TempTarget tempTarget = new TempTarget();
tempTarget.date = System.currentTimeMillis();
tempTarget.durationInMinutes = finalActivityTTDuration;
tempTarget.reason = MainApp.gs(R.string.activity);
tempTarget.source = Source.USER;
tempTarget.low = Profile.toMgdl(finalActivityTT, currentProfile.getUnits());
tempTarget.high = Profile.toMgdl(finalActivityTT, currentProfile.getUnits());
MainApp.getDbHelper().createOrUpdate(tempTarget);
} else if (startEatingSoonTTCheckbox.isChecked()) {
TempTarget tempTarget = new TempTarget();
tempTarget.date = System.currentTimeMillis();
tempTarget.durationInMinutes = finalEatingSoonTTDuration;
tempTarget.reason = MainApp.gs(R.string.eatingsoon);
tempTarget.source = Source.USER;
tempTarget.low = Profile.toMgdl(finalEatigSoonTT, currentProfile.getUnits());
tempTarget.high = Profile.toMgdl(finalEatigSoonTT, currentProfile.getUnits());
MainApp.getDbHelper().createOrUpdate(tempTarget);
} else if (startHypoTTCheckbox.isChecked()) {
TempTarget tempTarget = new TempTarget();
tempTarget.date = System.currentTimeMillis();
tempTarget.durationInMinutes = finalHypoTTDuration;
tempTarget.reason = MainApp.gs(R.string.hypo);
tempTarget.source = Source.USER;
tempTarget.low = Profile.toMgdl(finalHypoTT, currentProfile.getUnits());
tempTarget.high = Profile.toMgdl(finalHypoTT, currentProfile.getUnits());
MainApp.getDbHelper().createOrUpdate(tempTarget);
}
if (suspendLoopCheckbox.isChecked()) {
final LoopPlugin activeloop = ConfigBuilderPlugin.getActiveLoop();
activeloop.suspendTo(System.currentTimeMillis() + 30L * 60 * 1000);
ConfigBuilderPlugin.getCommandQueue().cancelTempBasal(true, new Callback() {
if (finalCarbsAfterConstraints > 0) {
DetailedBolusInfo detailedBolusInfo = new DetailedBolusInfo();
detailedBolusInfo.date = eventTime.getTime();
detailedBolusInfo.eventType = CareportalEvent.CARBCORRECTION;
detailedBolusInfo.carbs = finalCarbsAfterConstraints;
detailedBolusInfo.context = context;
detailedBolusInfo.source = Source.USER;
if (ConfigBuilderPlugin.getActivePump().getPumpDescription().storesCarbInfo) {
ConfigBuilderPlugin.getCommandQueue().bolus(detailedBolusInfo, new Callback() {
@Override
public void run() {
if (!result.success) {
ToastUtils.showToastInUiThread(MainApp.instance().getApplicationContext(), MainApp.gs(R.string.tempbasaldeliveryerror));
Intent i = new Intent(MainApp.instance(), ErrorHelperActivity.class);
i.putExtra("soundid", R.raw.boluserror);
i.putExtra("status", result.comment);
i.putExtra("title", MainApp.gs(R.string.treatmentdeliveryerror));
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
MainApp.instance().startActivity(i);
}
}
});
}
if (startActivityTTCheckbox.isChecked()) {
TempTarget tempTarget = new TempTarget();
tempTarget.date = System.currentTimeMillis();
tempTarget.durationInMinutes = finalActivityTTDuration;
tempTarget.reason = MainApp.gs(R.string.activity);
tempTarget.source = Source.USER;
tempTarget.low = Profile.toMgdl(finalActivityTT, currentProfile.getUnits());
tempTarget.high = Profile.toMgdl(finalActivityTT, currentProfile.getUnits());
MainApp.getDbHelper().createOrUpdate(tempTarget);
} else if (startEatingSoonTTCheckbox.isChecked()) {
TempTarget tempTarget = new TempTarget();
tempTarget.date = System.currentTimeMillis();
tempTarget.durationInMinutes = finalEatingSoonTTDuration;
tempTarget.reason = MainApp.gs(R.string.eatingsoon);
tempTarget.source = Source.USER;
tempTarget.low = Profile.toMgdl(finalEatigSoonTT, currentProfile.getUnits());
tempTarget.high = Profile.toMgdl(finalEatigSoonTT, currentProfile.getUnits());
MainApp.getDbHelper().createOrUpdate(tempTarget);
}
if (finalCarbsAfterConstraints > 0) {
DetailedBolusInfo detailedBolusInfo = new DetailedBolusInfo();
detailedBolusInfo.date = eventTime.getTime();
detailedBolusInfo.eventType = CareportalEvent.CARBCORRECTION;
detailedBolusInfo.carbs = finalCarbsAfterConstraints;
detailedBolusInfo.context = context;
detailedBolusInfo.source = Source.USER;
if (ConfigBuilderPlugin.getActivePump().getPumpDescription().storesCarbInfo) {
ConfigBuilderPlugin.getCommandQueue().bolus(detailedBolusInfo, new Callback() {
@Override
public void run() {
if (!result.success) {
Intent i = new Intent(MainApp.instance(), ErrorHelperActivity.class);
i.putExtra("soundid", R.raw.boluserror);
i.putExtra("status", result.comment);
i.putExtra("title", MainApp.gs(R.string.treatmentdeliveryerror));
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
MainApp.instance().startActivity(i);
}
}
});
} else {
MainApp.getConfigBuilder().addToHistoryTreatment(detailedBolusInfo);
}
} else {
MainApp.getConfigBuilder().addToHistoryTreatment(detailedBolusInfo);
}
}
});
builder.setNegativeButton(MainApp.gs(R.string.cancel), null);
builder.show();
dismiss();
}
});
builder.setNegativeButton(MainApp.gs(R.string.cancel), null);
builder.show();
dismiss();
} catch (Exception e) {
log.error("Unhandled exception", e);
}
}
@Override

View file

@ -32,25 +32,33 @@
android:padding="5dp"
android:src="@drawable/icon_cp_bolus_carbs" />
<CheckBox
android:id="@+id/newcarbs_activity_tt"
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginTop="5dp"
android:text="@string/start_activity_tt" />
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:orientation="vertical">
<CheckBox
android:id="@+id/carbs_eating_soon_tt"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/start_eating_soon_tt" />
<RadioButton
android:id="@+id/newcarbs_activity_tt"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginTop="5dp"
android:text="@string/start_activity_tt" />
<CheckBox
android:id="@+id/newcarbs_suspend_loop"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginBottom="5dp"
android:text="@string/suspendloopfor30min" />
<RadioButton
android:id="@+id/newcarbs_eating_soon_tt"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="@string/start_eating_soon_tt" />
<RadioButton
android:id="@+id/newcarbs_hypo_tt"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginBottom="5dp"
android:text="@string/start_hypo_tt" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"

View file

@ -33,18 +33,26 @@
android:padding="5dp"
android:src="@drawable/icon_bolus" />
<CheckBox
android:id="@+id/newinsulin_start_eating_soon_tt"
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginTop="5dp"
android:text="@string/start_eating_soon_tt" />
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_gravity="center_horizontal">
<CheckBox
android:id="@+id/newinsulin_record_only"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="@string/don_t_bolus_record_only" />
<CheckBox
android:id="@+id/newinsulin_start_eating_soon_tt"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginTop="5dp"
android:text="@string/start_eating_soon_tt" />
<CheckBox
android:id="@+id/newinsulin_record_only"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="@string/don_t_bolus_record_only" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"

View file

@ -410,6 +410,7 @@
<string name="openapsama_useautosens">Use AMA autosens feature</string>
<string name="refresheventsfromnightscout">Refresh events from NS</string>
<string name="eatingsoon">Eating Soon</string>
<string name="hypo">Hypo</string>
<string name="activity">Activity</string>
<string name="removerecord">Remove record:</string>
<string name="danar_stats">DanaR Stats</string>
@ -743,10 +744,14 @@
<string name="eatingsoon_target">eatingsoon target</string>
<string name="activity_duration">activity duration</string>
<string name="activity_target">activity target</string>
<string name="hypo_duration">hypo duration</string>
<string name="hypo_target">hypo target</string>
<string name="key_eatingsoon_duration" translatable="false">eatingsoon_duration</string>
<string name="key_eatingsoon_target" translatable="false">eatingsoon_target</string>
<string name="key_activity_duration" translatable="false">activity_duration</string>
<string name="key_activity_target" translatable="false">activity_target</string>
<string name="key_hypo_duration" translatable="false">hypo_duration</string>
<string name="key_hypo_target" translatable="false">hypo_target</string>
<string name="danar_history_prime">Prime</string>
<string name="gettingextendedbolusstatus">Getting extended bolus status</string>
<string name="gettingbolusstatus">Getting bolus status</string>
@ -988,5 +993,6 @@
<string name="overview_show_iob">Insulin On Board</string>
<string name="overview_show_basals">Basals</string>
<string name="no_action_selected">No action selected, nothing will happen</string>
<string name="start_hypo_tt">Start Hypo TT</string>
</resources>

View file

@ -25,6 +25,16 @@
android:inputType="numberDecimal"
android:key="@string/key_activity_target"
android:title="@string/activity_target"></EditTextPreference>
<EditTextPreference
android:defaultValue="0"
android:inputType="number"
android:key="@string/key_hypo_duration"
android:title="@string/hypo_duration"></EditTextPreference>
<EditTextPreference
android:defaultValue="0"
android:inputType="numberDecimal"
android:key="@string/key_hypo_target"
android:title="@string/hypo_target"></EditTextPreference>
</PreferenceScreen>
<PreferenceScreen android:title="@string/fillbolus_title">
<EditTextPreference