I tried the code below, but it didn't work.
This code should check the contents of the EditText, and when the password is the same as the value of the string realpass, it should start secactivity
Activity.
public void passthrought() {
EditText passview = (EditText)findViewById(R.id.editText);
String compare = passview.getText().toString();
String realpass = "3402";
if (compare == realpass) {
Intent intent = new Intent(this, secactivity.class);
startActivity(intent);
} else passthrought();
}
Thanks in advance