In my android application, I am using a custom dialog. When I try to show the dialog, it causes an error. I don\'t know what I am doing wrong, and I am really confused.
<
Documentation says:
The Dialog class is the base class for creating dialogs. However, you typically should not instantiate a Dialog directly. Instead, you should use one of the following subclasses:
AlertDialog
ProgressDialog
DatePickerDialog
TimePickerDialog
source: http://developer.android.com/guide/topics/ui/dialogs.html
Google doesn't seems to give a reason for this on this document, or the actual API reference for the Dialog class. And as you already know, the error message doesn't either. So I'm not sure why the class is not 'protected'.
Anyway, using one of the above classes should solve your issue.
Please comment if anyone knows why we can't use the Dialog class directly.