wear carb restriction

This commit is contained in:
AdrianLxM 2017-02-12 19:50:25 +01:00
parent c0b287ba00
commit 65d1624a5f
2 changed files with 3 additions and 3 deletions

View file

@ -83,7 +83,7 @@ public class BolusActivity extends Activity {
if (editCarbs != null){
def = SafeParse.stringToDouble(editCarbs.editText.getText().toString());
}
editCarbs = new PlusMinusEditText(view, R.id.amountfield, R.id.plusbutton, R.id.minusbutton, def, 0d, 100d, 1d, new DecimalFormat("0"), false);
editCarbs = new PlusMinusEditText(view, R.id.amountfield, R.id.plusbutton, R.id.minusbutton, def, 0d, 150d, 1d, new DecimalFormat("0"), false);
container.addView(view);
return view;
} else {

View file

@ -72,10 +72,10 @@ public class WizardActivity extends Activity {
final TextView textView = (TextView) view.findViewById(R.id.label);
textView.setText("carbs");
if (editCarbs == null) {
editCarbs = new PlusMinusEditText(view, R.id.amountfield, R.id.plusbutton, R.id.minusbutton, 0d, 0d, 100d, 1d, new DecimalFormat("0"), false);
editCarbs = new PlusMinusEditText(view, R.id.amountfield, R.id.plusbutton, R.id.minusbutton, 0d, 0d, 150d, 1d, new DecimalFormat("0"), false);
} else {
double def = SafeParse.stringToDouble(editCarbs.editText.getText().toString());
editCarbs = new PlusMinusEditText(view, R.id.amountfield, R.id.plusbutton, R.id.minusbutton, def, 0d, 100d, 1d, new DecimalFormat("0"), false);
editCarbs = new PlusMinusEditText(view, R.id.amountfield, R.id.plusbutton, R.id.minusbutton, def, 0d, 150d, 1d, new DecimalFormat("0"), false);
}
container.addView(view);