setInputType()
并且setTransformationMethod()
在我以编程方式在android中创建密码EditText时不起作用...
我的代码:
EditText edtPassword = new EditText(getApplicationContext());
edtPassword.setLayoutParams(rowParams);
edtPassword.setInputType(InputType.TYPE_TEXT_VARIATION_PASSWORD|InputType.TYPE_CLASS_TEXT);
edtPassword.setTransformationMethod(PasswordTransformationMethod.getInstance());
这不工作...