editText.setInputType(EditorInfo.TYPE_CLASS_PHONE); 转载于:https://www.cnblogs.com/rh1910362960/p/4250318.html