Possible Duplicate:
Screen orientation lock
I need some help here. In my android application, i've an activity that by pressing a button it will run a progress bar while it's in communication with a web service (in asynctask). This activity has only one layout and i've added the property android:configChanges="keyboardHidden|orientation so that it wouldn't crash on orientation changed.
Now i want something different. Now i need this activity with 2 different layouts, one for vertical orientation and other for horizontal orientation. And the solution for eliminate that property to enable orientation without crashing that i thought is, right after the click on the button that will call the WS i would need to disable in some way the possibility to change orientation, and right after this, enable again the orientation and everything would be back to normal preventing any kind of crash.
How can i do this? Anybody can help me?
Thanks