wear: fixup wizard percentage
This commit is contained in:
parent
baf0784df8
commit
2c7cf27047
1 changed files with 2 additions and 2 deletions
|
@ -26,7 +26,7 @@ public class WizardActivity extends ViewSelectorActivity {
|
||||||
PlusMinusEditText editPercentage;
|
PlusMinusEditText editPercentage;
|
||||||
|
|
||||||
boolean hasPercentage;
|
boolean hasPercentage;
|
||||||
double percentage;
|
int percentage;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
@ -72,7 +72,7 @@ public class WizardActivity extends ViewSelectorActivity {
|
||||||
} else if (col == 1 && hasPercentage) {
|
} else if (col == 1 && hasPercentage) {
|
||||||
final View view = getInflatedPlusMinusView(container);
|
final View view = getInflatedPlusMinusView(container);
|
||||||
if (editPercentage == null) {
|
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 {
|
} else {
|
||||||
double def = SafeParse.stringToDouble(editPercentage.editText.getText().toString());
|
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);
|
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