wear: fixup wizard percentage

This commit is contained in:
Andries Smit 2022-01-17 10:24:38 +01:00
parent baf0784df8
commit 2c7cf27047

View file

@ -26,7 +26,7 @@ public class WizardActivity extends ViewSelectorActivity {
PlusMinusEditText editPercentage;
boolean hasPercentage;
double percentage;
int percentage;
@Override
protected void onCreate(Bundle savedInstanceState) {
@ -72,7 +72,7 @@ public class WizardActivity extends ViewSelectorActivity {
} else if (col == 1 && hasPercentage) {
final View view = getInflatedPlusMinusView(container);
if (editPercentage == null) {
editPercentage = new PlusMinusEditText(view, R.id.amountfield, R.id.plusbutton, R.id.minusbutton, percentage, 50d, 150d, 1d, new DecimalFormat("0"), false);
editPercentage = new PlusMinusEditText(view, R.id.amountfield, R.id.plusbutton, R.id.minusbutton, (double)percentage, 50d, 150d, 1d, new DecimalFormat("0"), false);
} else {
double def = SafeParse.stringToDouble(editPercentage.editText.getText().toString());
editPercentage = new PlusMinusEditText(view, R.id.amountfield, R.id.plusbutton, R.id.minusbutton, def, 50d, 150d, 1d, new DecimalFormat("0"), false);