Since you call the "other" overlay when the orientation changes, a cheap hack would be to have the BUTTON Click listener set a global variable that the ORIENTATION listener can see and decide whether or not to allow the orientation change.
On Apr 15, 3:44 am, Kumar Bibek <coomar....@gmail.com> wrote: > Hi, > Well, preventing an orientation change is easy. But what about doing > it at run time. > > Say, I have an activity which supports orientation change in normal > situations. It has say three Edit Texts. > > There's also a button, which when clicked would do some processing in > a thread while showing a ProgressDialog which is not cancellable. > > Ok, so till the user hits the Button, I want the activity to be able > to adapt the orientation changes. I have two layouts files for each > orientation with different layout schemes. > > What I want is this. Once the user clicks on the button, and the > ProgressDialog is showing, I don't want the activity now to be re- > created again when the orientation changes. So, before showing the > ProgressDialog, is there any way to tell the Activity not to handle > Orientation change? > > Also, once the process is complete, and the ProgressDialog is removed, > I want the Activity again to be able to handle orientation changes. > > :) I know, we can save the state of all the things, and retrieve them > back. But, just curious if this can be done? > > Thanks and Regards, > Kumar Bibek -- 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 To unsubscribe, reply using "remove me" as the subject.