EditTextView 设置数字密码
2020-11-26 本文已影响0人
被时光移动的城
mEdtPassword.setInputType(InputType.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_VARIATION_PASSWORD);
mEdtPassword.setFilters(new InputFilter[]{new InputFilter.LengthFilter(6) {
}});
mEdtPassword.setTransformationMethod(HideReturnsTransformationMethod.getInstance());
mEdtPassword.setTransformationMethod(PasswordTransformationMethod.getInstance());