Java tutorial
//package com.java2s; import android.widget.EditText; public class Main { public static boolean checkAlphabetic(EditText editText) { String pattern = "[a-zA-Z ]"; return (editText.getText().toString().matches(pattern)) ? true : false; } }