Android emulator - screenOrientation ignored
I have android:screenOrientation="portrait" set for my activity. Creating an AVD with resolution 800x480 and running my activity, 开发者_StackOverflow中文版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?
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
精彩评论