AVD 中没有键盘时横向模式无法工作?
我创建了两个 AVD,一个带硬件键盘,另一个没有。当我在数字键盘上单击 CTRL + F11/F12 或 7/9 时,带键盘的一个在 Android 屏幕中显示横向模式,但在 AVD 中没有硬件键盘,硬件都会改变方向,就像第一个 AVD 一样,但 Android 屏幕保持不变,不会将方向更改为横向,如下所示: http://img571.imageshack.us/img571/3624/landscapeh.jpg
I've created two AVDs, one with hardware keyboard, and other without..the one with keyboard shows the landscape mode in the android screen when I click CTRL + F11/F12 or 7/9 on numpad, but in the AVD with no hardware keyboard, the hardware things all change orientation, like the first AVD, but the android screen stays and doesn't change orientation to landscape, like this: http://img571.imageshack.us/img571/3624/landscapeh.jpg
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这是 2.3 AVD 中的一个错误,已在此处得到解答
Android - 模拟器处于横向模式,屏幕不旋转
This is a bug in the 2.3 AVD and it is already answered here
Android - Emulator in landscape mode, screen does not rotate
如果值为 no,则设置为 yes。
祝你好运!
if value is no, set to yes.
Good luck!!
我在 API 19 (Android 4.4.2) 上也遇到了同样的问题。我希望仅支持在横向模式下运行。尽管在编辑设备时将“方向”设置为“纵向”(在“启动大小和方向”下),但设备将始终启动“纵向”。
我最终在
hardware-qemui.ini
文件中手动切换宽度和高度。因此,在文本编辑器中编辑此文件:
切换宽度和高度的值,使宽度比高度长:
AVD 现在以横向模式启动。方向仍然可以通过快捷键更改。
I had the same problem with an API 19 (Android 4.4.2). I had wanted to only support running in Landscape mode. Despite setting Orientation to Portrait when editing the device (under Startup size and orientation), the device would always start Portrait.
I ended up manually switching the width and height in the
hardware-qemui.ini
file.So, edit this file in a text editor:
Switch the values of the width and height, so that the width is longer than the height:
The AVD now boots in Landscape mode. The orientation may still be changed with shortcut keys.