wear: fixup wizard percentage
This commit is contained in:
parent
baf0784df8
commit
2c7cf27047
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue