On Mon, Apr 19, 2010 at 12:25 PM, tripy <tsch...@gmail.com> wrote: > I would be using a layout as a dialog, I'd understand. But I'm not using > this. Though I'll try, for the experiment. >
I'm not sure what you're saying here. > I am using the android.app.ProgressDialog class. > http://developer.android.com/reference/android/app/ProgressDialog.html > Yes, and one way to show a ProgressDialog (or any dialog for that matter) is to use Activity.show(int id) where id represents the dialog you want to show. If you do this the life of the dialog will be managed by the Activity, simplifying things like orientation change with a dialog shown. > Both the static method ProgressDialog.show(Context context, CharSequence > title, CharSequence message, boolean indeterminate, boolean > cancelable) and creating a new ProgressDialog()Context and calling .show() > result in the same. > > That's what I don't understand. > I noticed that when you call your inProgress function, you're replacing the class variable each time. So if you do inProgress twice in a row your new dialog will replace the previous one and you lose your handle to dismiss the first one you showed. This might be your problem. Try initializing the progress dialog up front in onCreate and then in inProgress just update the properties on it by using it's setter functions (setTitle, setMessage). ------------------------------------------------------------------------------------------------- TreKing - Chicago transit tracking app for Android-powered devices http://sites.google.com/site/rezmobileapps/treking -- You received this message because you are subscribed to the Google Groups "Android Beginners" group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en