if((noValidate.getText().toString().length()>0) && (nameValidate.getText().toString().length()>0) &&
(conpassValidate.getText().toString() == passValidate.getText().toString()) && (email.matches(emailPattern))
&&(passValidate.getText().toString().length()>0))
{
Toast.makeText(this, "Your Information are saved succesfully ", Toast.LENGTH_SHORT).show();
Intent getStarted = new Intent(getApplicationContext(), FourthActivity.class);
startActivity(getStarted);
}
else
{
Toast.makeText(this, "Field Requiered",Toast.LENGTH_SHORT ).show();
}
}
在这里,当我单击登录按钮时,它将验证并汇总该字段。如果任何字段为空,它将显示该字段为必填项。如果我在所有字段中输入数据意味着它总是显示该字段是必需的。我不知道问题出在哪里。