In my app i usually show validation error msg like follow :
if(someString.equals("")){
editText.setError("UserName Should not be blank");
}
is there other way to show error message??
i need your suggestion
I think the way you are showing the error message is better than toast. Sometimes toast duration is too short and the user isn't able to see that.
You can also achieve it by doing this:
EditText et11 = (EditText)findViewById(R.id.username);
if(et11.getText().toString().isEmpty())
{
et11.setError("UserName Should not be blank");
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With