我在Android开发中面临一个问题,其中密码号码(6823969093)工作正常,但密码字母(helloworld或hello34world)不起作用。
由于
final EditText editTextemail = (EditText) findViewById(R.id.editEmail);
final EditText editTextpassword = (EditText) findViewById(R.id.editPassword);
Button buttonSubmit = (Button) findViewById(R.id.btnSubmit);
final CheckBox showPasswordCheckBox = (CheckBox) findViewById(R.id.checkBox);
showPasswordCheckBox.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (showPasswordCheckBox.isChecked()){
editTextpassword.setTransformationMethod(null);
}else{
editTextpassword.setTransformationMethod(new PasswordTransformationMethod());
}
}
});
buttonSubmit.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
email = editTextemail.getText().toString();
password = editTextpassword.getText().toString();
handler = new DBHandler(getBaseContext());
handler.open();
handler.addLogIn(email, password);
handler.close();
finish();
}
});