Use this.
If (edittext.getText().toString()==myPreProgrammedString){
start next activity
}
else{
show warning wrong password
}
Usually you would put something like this in a onClick method of a login button. But I use something similar in textwatchers afterTextChanged method to check if the entered text is in a list and then enable the OK button.
BTW: hardcoding passwords in an app is never good practice.
4
solved Define a value to EditText