摘要: String txt = edInput.getText().toString(); Pattern p = Pattern.compile("[0-9]*"); Matcher m = p.matcher(txt); if(m.matches() ){ Toast.makeText(Main.this,"输入的是数字", Toast.LENGTH_SHORT).show(); } p=Pattern.compile("[a-zA-Z]"); m=p.matcher(txt); if(m.matches()){ Toast.makeT 阅读全文
posted @ 2013-09-12 11:15 天边的星星 阅读(18370) 评论(0) 推荐(0) 编辑