The following is a very basic demonstration of how to display an alert.
However, in most cases you are probably going to want more interaction with the dialog that is displayed to your users. With each of the dialogs you get access to the following common properties.
-1
will disable the timer.There is also a common property for the buttons that gets displayed with your dialog.
Button properties can include the following:
Finally you have the following callback notifications for dealing with a dialog:
It sounds like a lot for a simple dialog but the goal is to serve those that want it all at times. However, strides have been made to still keep it fairly simple.
So bringing it all together we can create something like the following:
Aside from the default properties alert dialogs can be loaded with the following:
You can read the History section for details as to where these properties came from.
If no buttons are supplied the alert dialog displays the following by default:
Example:
Taking it even further we can do the following which uses most of the properties available to an alert dialog.
The confirmation dialog supports all of the common properties and if no buttons are supplied it displays the following:
Example:
Let's take it even further and show how we can use all of the properties available.
Aside from the default properties prompt dialogs can also be configured with the following:
If no buttons are supplied the alert dialog displays the following by default:
Example:
Let's take it even further and show how we can use all of the properties available.
The inform dialog supports all of the default properties and callback notifications. The only exception that the inform dialog has over the dialogs is that it does not support buttons.
Example