简体   繁体   中英

Android Emulator always starts in landscape

I've created an Android Emulator with API 11. It launches fine but when it loads the screen it is in landscape mode. What can I do to change this?

press num pad key 7 or 9 to change between landscape and portrait mode . Make sure the num lock is ON . Thanks

ctrl-F12 swaps between landscape and portrait. Default setting is related to your screen resolution setup I think.

I am assuming you are using Eclipse. If you go to the Android Virtual Device Manager, select Device Definitions... pick the device you are using as the emulator. you can Edit the settings for this on the right-hand side. Select check the boxes next to Portrait enabled and landscape enabled to toggle orientation off and on.

However, you do not say whether or not your app is ACTUALLY supposed to be in landscape orientation, or if it is the emulator displaying the app in landscape..

Be sure that numlock is OFF , then you can use 7 or 9 to switch the screen orientation. If it doesn't work, you can use telnet to check if the orientation sensor service is on!

Connect to your virtual device like this:

telnet localhost 5554

Where 5554 is the port used (it's written on top bar of the emulator window) by your device in my case is 5554.

Then on telnet launch this command:

sensor status

It should say:

sensor status
acceleration: enabled.
magnetic-field: enabled.
orientation: enabled.
temperature: enabled.
proximity: enabled.
OK

Good luck!

start the emulator in horizontal

goto settings-> Display ->

uncheck the Auto Rotation check box.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM