I’m having an issue creating a ProgressDialog in my onCreateDialog() method.
The code is as follows:
Dialog dialog;
switch(id){
case CONNECTING:
dialog = new ProgressDialog(this);
dialog.setMessage("Connecting").setTitle("");
return dialog;
Eclipse throws me an error setMessage wouldn’t be a valid Method of the type ProgressDialog, though I expect it to be there since the documentation for API8 (which I use) says so.
AFAIK the instantiation should be possible since ProgressDialog ihnerits from Dialog right?
Can someone help me at this? It’s really weird.
You need to change your code to:
Alliteratively, you can change dialog to type ProgresssDialog if you are always returning a ProgresssDialog, but I doubt it.