您的位置:首页 > 其它

edittext密码显示隐藏

2015-03-17 11:22 169 查看
在xml中设置edittext属性android:password="true"

在java中

if (!mbDisplayFlg) {
// display password text, for example "123456"
et_password.setTransformationMethod(HideReturnsTransformationMethod.getInstance());
} else {
// hide password, display "."
et_password.setTransformationMethod(PasswordTransformationMethod.getInstance());
}
mbDisplayFlg = !mbDisplayFlg;
et_password.postInvalidate();
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: