When the field is left blank it makes the app crash. How can i stop it ?
EditText editText = (EditText)findViewById(R.id.editText);
userNumber = Integer.parseInt(editText.getText().toString());
I tried giving it a .setError("Don't leave this blank!"), but it doesn't seem to do the thing, the app crashes there.