What is the best way of displaying error messages to the user?
Assume the following scenario (just for example, this question relates to common problem, when error may occur in service, in the thread etc.):
I have used the alertDialog.. refer the Images. futher google it
For user Attention.
for form Validation edit texts use
editText.setError("Your error message") method
for internet connection failed
for internent connection failed with retry.
For showing some auto terminate info/message we use
for example notifying a user that your
Email was sent Successfully. We can Use Toast like below
Toast.makeText(context, "Email was sent Successfully.", duration).show()
Note: User can't interact with Default toast, See also Custom Toast Layout
Another option is to use the new
Hope this will be helpful