Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

android studio java catch empty Button

        int guessValue;
        //Try-Catch to Catch any Kind of Error from editText
        try {
            guessValue = Integer.parseInt(editText.getText().toString());
        }catch (Exception e)
        {
            Toast.makeText(this,"Please Enter a Valid Number",Toast.LENGTH_LONG).show();
            return;
        }
 
PREVIOUS NEXT
Tagged: #android #studio #java #catch #empty #Button
ADD COMMENT
Topic
Name
6+3 =