wear 5 minute steps for duration of temp targets

This commit is contained in:
AdrianLxM 2017-02-19 22:42:31 +01:00
parent 885b5e02b8
commit 1c522d4a4d

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);