I know that the Dialog class is the base class for dialogs, but it says in the documentation that you should avoid instantiating Dialog directly. Instead, you should use one of the following subclasses: AlertDialog or DatePickerDialog or TimePickerDialog.
Why?

