Code example for EditText

Methods: getTextsetError

0
            return ""; 
        } 
        return res;
    } 
    private boolean checkEmptyText(EditText txt) {
        if(TextUtils.isEmpty(txt.getText().toString())) {
            txt.setError("Empty");
            return false; 
        } 
        txt.setError(null);
        return true; 
    } 
     
     
    private class AccountCreationResult { 
        final String username;
        final String password;
        AccountCreationResult(String uname, String pwd){
            username = uname;
            password = pwd;
        }