android 动态控制EditText的可见性

先上图。

1.在EditText的属性inputType="textPasswrod"时可将文本改为下图的符号显示。


2.代码控制EditeText的文本是否可见。

通过edt_password.setTransformationMethod(HideReturnsTransformationMethod.getInstance());//可见


通过edt_password.setTransformationMethod(PasswordTransformationMethod.getInstance());//不可见


猜你喜欢

转载自blog.csdn.net/qq_35809640/article/details/78528094