[android-developers] Re: Quirky behavior when rotating screen in API Demos sample, Progress dialog

2008-09-06 Thread hackbod
On Sep 4, 2:43 pm, blindfold <[EMAIL PROTECTED]> wrote: > Moreover, killing the old handler will not solve the problem with the > out-of-control new progress dialog that Android instantiates upon a > screen orientation change. I would have to know its handle to dismiss > it, but I cannot know its

[android-developers] Re: Quirky behavior when rotating screen in API Demos sample, Progress dialog

2008-09-06 Thread blindfold
I finally obtained a workaround/fix, as described in http://code.google.com/p/android/issues/detail?id=857 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email

[android-developers] Re: Quirky behavior when rotating screen in API Demos sample, Progress dialog

2008-09-04 Thread blindfold
Yes we agree now that it is not a trigger message problem. > the activity should stop the handler in onDestroy() So what method is there to kill or stop the handler? I could not find it. Moreover, killing the old handler will not solve the problem with the out-of-control new progress dialog tha

[android-developers] Re: Quirky behavior when rotating screen in API Demos sample, Progress dialog

2008-09-04 Thread Romain Guy
Because it's the old Handler for the old ProgressDialog. A new ProgressDialog is created when the screen orientation change. That new progress dialog should have a new handle to take care of it. And the activity should stop the handler in onDestroy() to avoid keeping it running for a while after a

[android-developers] Re: Quirky behavior when rotating screen in API Demos sample, Progress dialog

2008-09-04 Thread blindfold
Adding one debug output line to AlertDialogSamples.java to get super.handleMessage(msg); Log.i("OIC", "mProgress = " + mProgress); shows that the handler keeps incrementing mProgress under the condition that I mentioned, but without dismissing the dialog when mProgress reaches 100 (and ind

[android-developers] Re: Quirky behavior when rotating screen in API Demos sample, Progress dialog

2008-09-04 Thread Romain Guy
The bug is just in the sample application: it should call mProgressHandler.sendEmptyMessage(previousProgress) after an orientation change and if the progress dialog is showing. There is no cleanup problem or conflict or anything like this. On Thu, Sep 4, 2008 at 9:58 AM, blindfold <[EMAIL PROTECT

[android-developers] Re: Quirky behavior when rotating screen in API Demos sample, Progress dialog

2008-09-04 Thread blindfold
For my own use I do not care if the progress dialog continues from where it was or starts all over, so I need no save/restore of its state. However, the fact that the progress bar does not start at all after changing screen orientation suggests a bug. The impression I got is that the progress dial

[android-developers] Re: Quirky behavior when rotating screen in API Demos sample, Progress dialog

2008-09-04 Thread Romain Guy
It's actually easy to circumvent. On orientation change, the activity should save the current progress value in its Bundle (in onSaveInstanceState().) Then, when the activity is recreated, it should read this value back and resume the progress from where it stopped. On Thu, Sep 4, 2008 at 8:52 AM

[android-developers] Re: Quirky behavior when rotating screen in API Demos sample, Progress dialog

2008-09-04 Thread blindfold
Yes the dialog should remain visible but be automatically dismissed after the progress bar fills up, just like when one does not change the screen orientation. It is the restarting of the application (I noticed that in my own app) that apparently gets the running progress dialog handling messed up

[android-developers] Re: Quirky behavior when rotating screen in API Demos sample, Progress dialog

2008-09-04 Thread Romain Guy
This is the correct behavior. The dialog should remain visible after a screen orientation change. There is a bug though, the progress bar should be filled automatically even after a screen rotation. On Thu, Sep 4, 2008 at 2:01 AM, blindfold <[EMAIL PROTECTED]> wrote: > > If one runs the SDK 0.9 b