简体   繁体   中英

How do I change screen orientation in the Android emulator?

How do we change emulator screen orientation to landscape or portrait?

Ctrl + F12是键盘快捷键。

Android Emulator Shortcuts

Ctrl+F11 Switch layout orientation portrait/landscape backwards

Ctrl+F12 Switch layout orientation portrait/landscape forwards

1. Main Device Keys

Home Home Button

F2 Left Softkey / Menu / Settings button (or Page up)

Shift+f2 Right Softkey / Star button (or Page down)

Esc Back Button

F3 Call/ dial Button

F4 Hang up / end call button

F5 Search Button

2. Other Device Keys

Ctrl+F5 Volume up (or + on numeric keyboard with Num Lock off) Ctrl+F6 Volume down (or + on numeric keyboard with Num Lock off) F7 Power Button Ctrl+F3 Camera Button

Ctrl+F11 Switch layout orientation portrait/landscape backwards

Ctrl+F12 Switch layout orientation portrait/landscape forwards

F8 Toggle cell network

F9 Toggle code profiling

Alt+Enter Toggle fullscreen mode

F6 Toggle trackball mode

对于那些以其他方式调整音量的讨厌的 Apple MacBook 键盘布局,请使用Ctrl + fn + F12

Num 7 on keypad does it for me. Remember it works only when Num Lock is off.

ctrl + fn + F11 on Mac to change the landscape to portrait and vice versa.

left-ctrl + F11 on Windows 7.

ctrl + F11 on Linux.

Ctrl + F11Ctrl + F12都有效。

On Ubuntu none of the keys ( Ctrl + F11 / F12 or numpad 7 / numpad 9 ) worked for me. But I can rotate the emulator sending the keys with xdotool .

For example for a VM named "Galaxy_Nexus" I can rotate the emulator with:

xdotool search --name "Galaxy" key "ctrl_L+F11"

Additionally, you must verify the autorotate setting on the emulator. Because of if this setting is off, you can't change the orientation besides press the rotate buttons. In the following picture, I will show how you can do this.

激活自动旋转设置

For Mac, use:

Ctrl + FN + F11

​​​​

Ctrl + F11 、小键盘 7和小键盘 9在我的Ubuntu 机器上不起作用,但Ctrl + F12可以。

You no longer need to remember the shortcuts. The latest Android AVD interface contains a sidebar with various functional shortcuts. I've circled in blue the buttons that rotate the screen clockwise and counter-clockwise.

在此处输入图片说明

Ubuntu Release 12.04 (precise) 64-bit
DELL Latitude E6320

CTRL + (double tap on F12 )

Fn + 7 is a solution for keyboards where the num keypad is merged with the main keypad. Here the key with 7 (and &) is the key that has the blue-coloured 7.

Android Emulator Shortcuts

Ctrl + F11 Switch layout orientation portrait/landscape backwards

Ctrl+F12 Switch layout orientation portrait/landscape forwards

  1. Main Device Keys

Home Home Button

F2 Left Softkey / Menu / Settings button (or Page up )

Shift + F2 Right Softkey / Star button (or Page down )

Esc Back Button

F3 Call/ dial Button

F4 Hang up / end call button

F5 Search Button

  1. Other Device Keys

Ctrl + F5 Volume up (or + on numeric keyboard with Num Lock off) Ctrl + F6 Volume down (or + on numeric keyboard with Num Lock off) F7 Power Button Ctrl + F3 Camera Button

Ctrl + F11 Switch layout orientation portrait/landscape backwards

Ctrl + F12 Switch layout orientation portrait/landscape forwards

F8 Toggle cell network

F9 Toggle code profiling

Alt + Enter Toggle fullscreen mode

F6 Toggle trackball mode

On Android Studio 4.0.1 , the emulator includes buttons for rotation.

In the image below, the Rotate Left (shortcut: Ctrl + Left ) button is outlined in blue and the Rotate Right (shortcut: Ctrl + Right ) button is outlined in red.

安卓模拟器

After pressing one of the buttons to rotate, the orientation of the application itself will not change. For instance, if we pressed Rotate Left, the application would look this:

Android 模拟器向左旋转

To change the orientation of the running application, it is necessary to click the icon outlined in red above. Note that this icon may take a few seconds to show up and will disappear shortly. Also, when rotating back to portrait orientation, one must press the opposite rotate button for the icon to appear. This means that if we pressed Rotate Left, we need to press Rotate Right to return to the original orientation, and vice versa.

Android 模拟器景观

在我的笔记本电脑 Dell Latitude E4310 中, Ctrl + F12键可以完成这项工作。

Use function + 9 for HP laptops. Others keys specified in previous answers didn't work for me.

My virtual device could not be rotated. Go to the device list, click settings and change the predefined resolution.

左 Ctrl + F12 = 对于 Windows 8

To do this on the Surface

Ctrl + Fn + F12

With Android Studio:

Windows: Ctrl + Left-Arrow and Ctrl + Right-Arrow

All of the above methods didn't work for me. Using Left Ctrl + <Windows Key> + F11 worked on Linux Mint 17.

Super -> Ctrl_L -> F12在 Fedora 23 上对我有用

Ctrl + F12也适用于Windows 10。

In the updated emulator you don't have to remember the keyboard shortcuts -- they have added a side panel to the right side of the window. You can change the screen orientation by clicking either of the "rotate" buttons in that side panel.

在此处输入图片说明

Just click on Rotate button to change the landscape to portrait and vice versa.

On Mac to see the help: ⌘/ then you will see Keyboard shortcuts.

Rotate right: ⌘→ , Rotate left: ⌘←

For Linux use: Right_Ctrl + left_Arrow or Right_Ctrl + right_Arrow .

  1. Make sure Auto-rotate is ON

1个

  1. Rotate Right/Left.

2个

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