Merge pull request #186 from AdrianLxM/wear-bolus5

wear 5 minute steps for duration of temp targets
This commit is contained in:
Milos Kozak 2017-02-19 23:43:00 +01:00 committed by GitHub
commit 6e0040053f

View file

@ -78,10 +78,10 @@ public class TempTargetActivity extends ViewSelectorActivity {
final TextView textView = (TextView) view.findViewById(R.id.label);
textView.setText("duration");
if (time == null) {
time = new PlusMinusEditText(view, R.id.amountfield, R.id.plusbutton, R.id.minusbutton, 60d, 0d, 24 * 60d, 1d, new DecimalFormat("0"), false);
time = new PlusMinusEditText(view, R.id.amountfield, R.id.plusbutton, R.id.minusbutton, 60d, 0d, 24 * 60d, 5d, new DecimalFormat("0"), false);
} else {
double def = SafeParse.stringToDouble(time.editText.getText().toString());
time = new PlusMinusEditText(view, R.id.amountfield, R.id.plusbutton, R.id.minusbutton, def, 0d, 24 * 60d, 1d, new DecimalFormat("0"), false);
time = new PlusMinusEditText(view, R.id.amountfield, R.id.plusbutton, R.id.minusbutton, def, 0d, 24 * 60d, 5d, new DecimalFormat("0"), false);
}
setLabelToPlusMinusView(view, "duration");
container.addView(view);