edt_account.addTextChangedListener(new TextWatcher() { @Override public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) { } @Override public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) { } @Override public void afterTextChanged(Editable editable) { try { int edt_realCount = Integer.valueOf(edt_account.getText().toString().trim() + ""); if (edt_realCount > 5) { } else { return; } } catch (NumberFormatException e) { Log.e("传值问题", e.getMessage()); } } });
java.lang.NumberFormatException: Invalid int: "0 "
最新推荐文章于 2021-02-13 14:52:26 发布