et_context.setInputType(InputType.TYPE_CLASS_NUMBER);//限制输入数字
et_context.setFilters(new InputFilter[]{new InputFilter.LengthFilter(6)});//限制输入6位
EditText动态限制输入数字和长度
原创wx6461db575a437 博主文章分类:控件的基本设置 ©著作权
文章标签 EditText动态限制输入数字和长度 限制输入 文章分类 HarmonyOS 后端开发
-
Android中限制EditText输入数字范围
说明:android中要求输入框中只能输入有符号数字,并且限制范围,下面给出要求,例子和函数有需要可以借鉴。要求:输入整数数
android java EditText 输入限制 ide