ok i'm just wondering what's causing the view to change after the progress dialog goes away. one crazy theory i had was that you had a rogue onDismiss().
anything funky in the ddms log? is your activity being restarted somehow? >Guess I need to move to AsyncTask asap... > >No I don't have onDismiss handler, I assume when the dialog dismisses >what ever was displaying on the screen will not be changed... > >On Nov 3, 5:58 pm, Jason Proctor <jason.android.li...@gmail.com> >wrote: >> do you have an onDismiss handler for the progress dialog? >> >> i used to use Handlers, now i use AsyncTask. i'd never go back :-) >> >> >> >> >the show() and dismiss() of the dialog, even the new ProgressDialog() >> >are all inside Handler message processing codes. I don't think I need >> >to user AsyncTask here even it is very useful. Basically the Handler >> >receives data, updates the UI and dismisses the dialog. Then Bang! the >> >Login View shows up. >> >> >On Nov 3, 5:45 pm, Jason Proctor <jason.android.li...@gmail.com> >> >wrote: >> >> what does your code do when the asynchronous operation is complete? >> >> do you register an onDismiss() for the ProgressDialog? >> >> >> seriously though i would advise anyone doing anything with threads >> >> and progress dialogs to use AsyncTask. this wonderful class decouples >> >> the task from the caller and has nice hooks to do things like manage >> >> ProgressDialogs. and everything happens in the right thread >> >> automagically. >> >> >> adopt AsyncTask, see all problems like this go away. >> >> >> >Hi, I have a weird problem on progress dialog: >> >> >> >I have 2 views: Login View and say, Display View. >> >> >> >In Login View, when I click the 'Login' button, a progress dialog is >> >> >created (new ProgressDialog(...)), shown and stored in a variable >> >> >'mProgressDialog'. After login, the dialog is dismissed and some >> >> >information are displayed in Display View (Login View hides). Now I >> >> >want to display another progress dialog when 'Update' button is >> >> >clicked and when the update is done, dismiss the dialog and display >> >> >new information. So I use: >> >> >> >mProgressDialog = new ProgressDialog(...); >> >> >> >to create a new progress dialog with new title and message. Show. >> >> >> >Now the weird thing happens when the new dialog dismisses. The program >> >> >flashes the Display View for a blink and then shows the Login View.... >> >> >> >I tried to change the view etc. but same problem happens over and over >> >> >again. So I am thinking it might because one activity can only be >> >> >assigned to ONE progress dialog and no matter how you re-create it you >> >> >still get the same progress dialog. And the dialog is linked to a >> >> >certain view which will be shown automatically when the dialog >> >> >dismisses. >> >> >> >Please tell me I am wrong... >> >> >> >-- >> >> >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+unsubscr...@googlegroups.com >> >> >For more options, visit this group at >> >> >http://groups.google.com/group/android-developers?hl=en >> >> >> -- >> >> jason.vp.engineering.particle >> >> >-- >> >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+unsubscr...@googlegroups.com >> >For more options, visit this group at >> >http://groups.google.com/group/android-developers?hl=en >> >> -- >> jason.vp.engineering.particle > >-- >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+unsubscr...@googlegroups.com >For more options, visit this group at >http://groups.google.com/group/android-developers?hl=en -- jason.vp.engineering.particle -- 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en