How to check edittext's text is email address or not?
问题 how to check the text of edittext is email address or not without using javascript and regular expression? Here I used inputtype="textEmailAddress" this is working but no error message is display. 回答1: /** * method is used for checking valid email id format. * * @param email * @return boolean true for valid false for invalid */ public static boolean isEmailValid(String email) { String expression = "^[\\w\\.-]+@([\\w\\-]+\\.)+[A-Z]{2,4}$"; Pattern pattern = Pattern.compile(expression, Pattern