Saturday, May 28, 2011

[android-developers] Trying to get a ProgressDialog to display.

I have a function inside one of my activities that calculates some
statistics and takes a little time to generate a report. I want to
display a progressDialog while this is going on to give the user some
feedback that something is happening while he is waiting. The problem
I am having is that I can't get my progressDialog to display no matter
what I do. Is there some obscure factoid that I am missing out on
here that is preventing this to work. This problem is particularly
perplexing because I am using similar code elsewhere in the Activity
and that works ok. Any ideas


Here is my code:

//* ADD THE CODE FOR THE PROGRS DIALOG
//* Start the progress dialog
xReportProgress = ProgressDialog.show(this, "", "Preparing
Report.");
xReportProgress.show();

switch(iReportFormat)
{
case callLog.REPORT_FORMAT_CSV:
sReportOutput = this.createCSVReport();
break;

case callLog.REPORT_FORMAT_XML:
sReportOutput = this.createXMLReport();
break;

default:
ed.app.commTracker.main.systemLog.logError("Invalid report
format.");
return;

}

//* Close the dialog so we can display the intent chooser
xReportProgress.dismiss();

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate