android:numeric="integer" 代码中设置 editText.setInputType(InputType.TYPE_CLASS_NUMBER); 转载于:https://www.cnblogs.com/nyle-hui/p/4043590.html