How to show alertDialog Box using mvvm pattern

Viewed 237

I am working on a login module where I have to show alert dialog if the login is unsuccessful. I have a authentication process in viewmodel and I have to display an error in alert dialog.How it can be done?

1 Answers

You can use this answer to show alert dialog. All you need to change is, showing your error message in the setMessage method.

Android simple alert dialog

Related