android studio java catch empty button

Solutions on MaxInterview for android studio java catch empty button by the best coders in the world

showing results for - "android studio java catch empty button"
Aurelia
06 Jun 2018
1        int guessValue;
2        //Try-Catch to Catch any Kind of Error from editText
3        try {
4            guessValue = Integer.parseInt(editText.getText().toString());
5        }catch (Exception e)
6        {
7            Toast.makeText(this,"Please Enter a Valid Number",Toast.LENGTH_LONG).show();
8            return;
9        }