app/src/main/java/edu/washington/briluu/quizdroid/PreferencesActivity.java
// check the validity of the user inputs
check the validity of the user inputs
check the validity of the user inputs
private Boolean isFormValid() {
        String url = urlET.getText().toString();
        String interval = intervalET.getText().toString();
        if (url.length() == 0) {
            urlET.setError("Need to set a URL to retrieve quiz questions from!");
            return false;
        } else if (interval.length() == 0) {
            intervalET.setError("Need to set an interval length!");
            return false;
        } else {
            return true;
        }
    }
private Boolean isFormValid ( ) { String url = urlET . getText ( ) . toString ( ) ; String interval = intervalET . getText ( ) . toString ( ) ; if ( url . length ( ) == 0 ) { urlET . setError ( "Need to set a URL to retrieve quiz questions from!" ) ; return false ; } else if ( interval . length ( ) == 0 ) { intervalET . setError ( "Need to set an interval length!" ) ; return false ; } else { return true ; } }
check the validity of the user inputs
check the validity of the user inputs