kotlin EditText 显示/隐藏密码

pwd_txt_look_cb.setOnCheckedChangeListener{ _, isShow->

    ed_password.transformationMethod =if(isShow) HideReturnsTransformationMethod.getInstance()else PasswordTransformationMethod.getInstance()

}

你可能感兴趣的:(kotlin EditText 显示/隐藏密码)