java - Issue to call setMessage() on ProgressDialog -
i'm having issue creating progressdialog in oncreatedialog() method. code follows:
dialog dialog; switch(id){ case connecting: dialog = new progressdialog(this); dialog.setmessage("connecting").settitle(""); return dialog;
eclipse throws me error setmessage wouldn't valid method of type progressdialog, though expect there since documentation api8 (which use) says so. afaik instantiation should possible since progressdialog ihnerits dialog right?
can me @ this? it's weird.
you need change code to:
dialog dialog; switch(id){ case connecting: dialog = new progressdialog(this); ((progressdialog)dialog).setmessage("connecting"); dialog.settitle(""); return dialog;
alliteratively, can change dialog type progresssdialog if returning progresssdialog, doubt it.
Comments
Post a Comment