AlertDialog orientation problem. Portrait is Landscape ?!?

AlertDialog orientation problem. Portrait is Landscape ?!?
0.0 0



For the sake of my program, I had to implement AlertDialog message box.
The AlertDialog is created in runOnUIThread like so

mainActivity.runOnUiThread(new Runnable() { //Override public void run() { // TODO Auto-generated method stub mainActivity.showDialog(0); } });

The AlertDialog is showing on the screen, however, it’s orientation is wrong. The OpenGL Surface is displaying on landscape, while the AlertDialog is in portrait.
In the application manifest, the app is set to run in Portrait mode. If I change that to Landscape, the AlertView is showing Landscape oriented, but the OpenGL View is then in Portrait mode…

Does anyone knows why is the Portrait mode corresponding to a Landscape OpenGL view ? Also, CCMessageBox doesn’t display properly either.
And does anyone know how to fix this ?

Thanks in advance,


I think you should refer [[About device orientation]].