Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在开发一个登录模块,如果登录不成功,我必须在其中显示警报对话框。我在 viewmodel 中有一个身份验证过程,我必须在警报对话框中显示一个错误。如何完成?
您可以使用此答案显示警报对话框。您需要更改的只是在 setMessage 方法中显示错误消息。
Android 简单的警报对话框