Using a dialog to request a user's choice. Such as an alert requires the user to tap OK or Cancel. A dialog is a window that appears on top of the display or fills the display, interrupting the flow of activity. In this practical, a Button is used to trigger a standard alert dialog. In a real-world app, you might trigger an alert dialog based on some condition, or based on the user tapping something. Also note: Use dialogs sparingly, because they interrupt the user's workflow. Also checkout, best design practices from: Dialogs material design guide and Dialogs in the Android developer documentation. https://material.io/components/dialogs https://developer.android.com/guide/topics/ui/dialogs.html
brianmaleek / dialog_for_alert Goto Github PK
View Code? Open in Web Editor NEWDialog for alert