edittext的密码显示与隐藏

if (!passwordShop) {
    //显示密码
    edt_import_account_pw.setTransformationMethod(HideReturnsTransformationMethod.getInstance());
    passwordShop = true;
} else {
    //隐藏密码
    edt_import_account_pw.setTransformationMethod(PasswordTransformationMethod.getInstance());
    passwordShop = false;
}

猜你喜欢

转载自blog.csdn.net/freak_csh/article/details/80866005