views:

17

answers:

0

Does it exist a way to apply a rotation (of 90 degrees) to an AlertDialog that has been created by the system ?

This could seem tricky at first sight. My application uses the camera in preview and must work in landscape AND in portrait, starting from Android 1.5.

However, when the OS automatically manages the phone orientation, the previewed image is not displayed in the same way on all phones !!! (I have test with an Android Dev Phone 1 = G1, a HTC Desire and a Samsung Galaxy). When I fixed the issue on the G1, the issue occurs on the Desire....

The only way to fix it on all phones consists in forcing the application to stay in landscape (android:screenOrientation="landscape" in the AndroidManifest.xml) and to manage to apply a rotation of 90° to each displayed element so that the UI will be in portrait from the user point of view.

However, system dialogs must also undergo a rotation...

So my question is : is it possible to change the orientation of an AlertDialog created by the system, maybe using a tricky way ?

If not, I know how to do it using a custom layout but I will lose the system style...

Thanks for your help !!!

Sylvain