private boolean eyes_open = false;
public void lookPwdClick(View view) {
if (eyes_open) {
btnLookPwd.setBackgroundResource(R.drawable.open_eye);
editPwd.setTransformationMethod(HideReturnsTransformationMethod
.getInstance()); //密码隐藏
} else {
btnLookPwd.setBackgroundResource(R.drawable.close_eye);
editPwd.setTransformationMethod(PasswordTransformationMethod
.getInstance()); //密码显示
}
eyes_open = !eyes_open;
}
public void lookPwdClick(View view) {
if (eyes_open) {
btnLookPwd.setBackgroundResource(R.drawable.open_eye);
editPwd.setTransformationMethod(HideReturnsTransformationMethod
.getInstance()); //密码隐藏
} else {
btnLookPwd.setBackgroundResource(R.drawable.close_eye);
editPwd.setTransformationMethod(PasswordTransformationMethod
.getInstance()); //密码显示
}
eyes_open = !eyes_open;
}