Switching to landscape mode in Android Emulator

This is probably a pretty easy to answer question, but I can't find the solution myself after a couple hours of searching the documentation and Google. I set the orientation of my Android app to landscape in the AndroidManifest.xml file:

android:screenOrientation="landscape"

However, when I run the app in the simulator, it appears sideways and in portrait mode. How can I switch the emulator to landscape mode on a mac ? It's running the 1.6 SDK.


Try:

  • ctrl+fn+F11 on Mac to change the landscape to portrait and vice versa.
  • left-ctrl+F11on Windows 7.
  • ctrl+F11on Linux.
  • For Mac users, you only need to use the fn key if the setting "Use all F1, F2 etc. keys as function keys" (under System Preferences -> Keyboard) is checked.

  • left-ctrl+F11on Windows 7 It works fine in Windows 7 for android emulator to change the landscape orientation to portrait and vice versa.

  • Not sure about your question - "sideways" is the same as "landscape".

    If you mean how to switch during runtime:

  • Switch to previous layout orientation (for example, portrait, landscape): KEYPAD_7, Ctrl + F11
  • Switch to next layout orientation (for example, portrait, landscape): KEYPAD_9, Ctrl + F12
  • From docs.


    Just use 9 in numeric keyboard with num-lock off.

    图像显示9突出显示的数字键盘

    7 rotates in the opposite direction.

    链接地址: http://www.djcxy.com/p/90716.html

    上一篇: 检查Android手机的方向

    下一篇: 在Android模拟器中切换到横向模式