I have an android app. in that I am comparing two strings from the EditTest, but I get some strange results...
if(v==findViewById(R.id.submit)){
//
if(email==crfm_email)
{
String warn="Done!";
Toast toast = Toast.makeText(getBaseContext(), warn, Toast.LENGTH_LONG);
toast.show();
}
else
{
oFN=(EditText)findViewById(R.id.owners_first_name);
String warn="email addresses do not match "+eMail+" "+crfEmail;
Toast toast = Toast.makeText(getBaseContext(), warn, Toast.LENGTH_LONG);
toast.show();
}
}
the problem is that the control always goes to the else part even if the input for both variables are same. I know that its a simple mistake but cant crack it out...!