views:

154

answers:

2

I have android:screenOrientation="portrait" set for my activity. Creating an AVD with resolution 800x480 and running my activity, the GLSurfaceView is created with dimensions 800x480 (ie. not rotated and width > height). I would expect it to be created with dimensions 480x800 and be rotated 90 degrees.

Is this a bug in the emulator or am I wrong in my interpretation of android:screenOrientation?

A: 

You have to hit the hotkey to change the Emulator's orientation.

Brad Hein
Can you expand on that? I have noticed that using say the HVGA skin, changing orientation with the hotkey and then launching the app results in the correct behaviour. Are you saying this is a workaround instead of using the HVGA-L skin?
Viktor
A: 

i believe android:screenOrientation="portrait" is just a constraint for your layout to keep portrait even when you rotate the emulator (Hit Ctrl+F11)

to get a layout with a landscape portrait, easily create a layout-land folder in your projectname/res/ (the sam hierarchy level with layout folder) and put your XML with landscape design into the layout-land folder. The XML name should exact between both the layout and layout-land folder

Lebriga