Landscape mode not working with no keyboard in AVD?
I've created two AVDs, one with hardware keyboard, and othe开发者_如何学JAVAr 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
This is a bug in the 2.3 AVD and it is already answered here
Android - Emulator in landscape mode, screen does not rotate
- Run 'Android SDK and AVD Manager'
- Select AVD
- Edit
- check Keyboard lid support if value is no, set to yes.
- Run AVD and try
Good luck!!
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:
C:\Users\<user>\.android\avd\<deviceName>.avd\hardware-qemu.ini
Switch the values of the width and height, so that the width is longer than the height:
hw.lcd.width = 800
hw.lcd.height = 480
The AVD now boots in Landscape mode. The orientation may still be changed with shortcut keys.
精彩评论