I already know what is causing this error, I just do not know how to handle the case when a user doesn\'t enter anything into the dialogue box, then hit the button which par
String text = editText.getText().toString(); if(!text.equals("") && text.matches("^\\d+$")){ cast to int }