|
|
|
@ -68,15 +68,19 @@ public class ExchangeEditText extends LinearLayout {
|
|
|
|
|
}
|
|
|
|
|
boolean ok = true;
|
|
|
|
|
String nativeAmount = getNativeAmount();
|
|
|
|
|
try {
|
|
|
|
|
double amount = Double.parseDouble(nativeAmount);
|
|
|
|
|
if ((amount < min) || (amount > max)) {
|
|
|
|
|
if (nativeAmount == null) {
|
|
|
|
|
ok = false;
|
|
|
|
|
} else {
|
|
|
|
|
try {
|
|
|
|
|
double amount = Double.parseDouble(nativeAmount);
|
|
|
|
|
if ((amount < min) || (amount > max)) {
|
|
|
|
|
ok = false;
|
|
|
|
|
}
|
|
|
|
|
} catch (NumberFormatException ex) {
|
|
|
|
|
// this cannot be
|
|
|
|
|
Timber.e(ex.getLocalizedMessage());
|
|
|
|
|
ok = false;
|
|
|
|
|
}
|
|
|
|
|
} catch (NumberFormatException ex) {
|
|
|
|
|
// this cannot be
|
|
|
|
|
Timber.e(ex.getLocalizedMessage());
|
|
|
|
|
ok = false;
|
|
|
|
|
}
|
|
|
|
|
if (!ok) {
|
|
|
|
|
shakeAmountField();
|
|
|
|
|